in Databases
431 views
0 votes
0 votes
Let R = (A, B) and S = (A, C), and let r (R) and s(S) be relations.
Using the special constant null, write tuple-relational-calculus expressions
equivalent to each of the following:
a. r $ROJ$ s
b. r $FOJ$ s
c. r $LOJ$ s
in Databases
431 views

1 Answer

0 votes
0 votes
R ROJ S :

{t | ∃r ϵR , ∃s ϵS (r[A]=s[A] ^ t[A]=s[A] ^ t[C]=s[C] ^ t[B]=r[B]) ∨ ¬∃r ϵR , ∃s ϵS (r[A]=s[A] ^ t[A]=s[A] ^ t[C]=s[C] ^ t[B]=null))}

 

R FOJ S:

 

 

R  LOJ S :

{t | ∃r ϵR , ∃s ϵS (r[A]=s[A] ^ t[A]=r[A] ^ t[B]=r[B] ^ t[C]=r[C] ) ∨ ∃r ϵR , ¬∃s ϵS (r[A]=s[A] ^ t[A]=r[A] ^ t[B]=r[B] ^ t[C]=null))}

1 comment

Won’t Full outer join be and of both LOJ and ROJ in this case ?
0
0

Related questions