#notes# database chapter 2

1.terminologies:

attributes(column in table)  table(relation)  domain(permitted value)

tuple(row)        

database shema && database instance    --------------->>>>  type definition  && variable

2.key

superkey (can uniquely mark a tuple in a relation)  ---->>>>  candidate key (its subset cannot be superkey) 

---->>>>primary key(designer chosen)

 

3.relational-Algebra operation

a. select   b.project  

c.union: here are two conditions to hold for validaty 

i. the same number of attributes(the same arity);  ii.corresponding attribute is the same

d. - (con)  e. ×  f.rename

g.∩  h.natural join(theta) i.÷(condition)   j.assignment <-  

 

~Extended~  Generalized projection    aggregate function(max, min, count, count-distinct, avg, sum...)

         outer join(left, right, full)    null values  

 

~Database modification~

        deletion(set difference)  updating(select, projection)    insertion(union)

 

just a daily review or extraction  : P

posted @ 2013-10-29 02:19  Ramanujan  阅读(186)  评论(0编辑  收藏  举报