Set Theoretic Operation (Cont.)


Assignment and Alias
Let R be a table and let Head(R)=A1…An. Assume that B1…Bn are n attributes such that Domain(Bi)=Domain(Ai) for all i, 1≤i≤n. We define a new table S, whose heading is Head(S)=B1…Bn, by writing the assignment
S( B1, ..., Bn ) := R( R1, ..., An )
The content of the new table S is exactly the same as the content of the old table R. S is an alias of the table or R is all attributes are identical between the two tables: S:=R.

An Example
R
A B C
a1 b1 c1
a1 b2 c3
a2 b1 c2
S
A B C
a1 b1 c1
a1 b1 c2
a1 b2 c3
a3 b2 c3
T := (R∪S)–(R∩S)

T1 := (R∪S)
T2 := (R∩S)
T := T1–T2
T
A B C
a1 b1 c2
a2 b1 c2
a3 b2 c3