
















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















































































Renaming in Cartesian Product
E.g., suppose R(A,B) and S(A,C) and we wish to compute R × S. One solution is to rename the attributes of the answer:
R × S( R.A, R.B, S.A, S.C)
Although only A needs to be renamed, it is“cleaner” to rename them all.
This is a relation with 4 attributes: StudId, CrsCode1, ProfId, CrsCode
Derived Operation: Join
A ( general or theta ) join of R and S is the expression R (^) join-condition S where join-condition is a conjunction of terms:
Ai oper Bi in which Ai is an attribute of R; Bi is an attribute of S; and oper is one of =, <, >, ≥ ≠, ≤.
The meaning is:
where join-condition and join-condition ´ are the same, except for possible renamings of attributes caused by the Cartesian product.
Id Name Addr Status
StudId CrsCode Sem Grade
The equijoin is used very frequently since it combines related data in different relations.
Student (^) Transcript
We don’t want to join on CrsCode , Sem , and Grade attributes, hence renaming!
πfid (πfid,subj (Teaches ⋈ COURSE) ÷ πsubj (COURSE))