Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the relational schemas R(ABC) and S(CDE), let r(R) and s(S) be the relatio

ID: 663649 • Letter: G

Question

Given the relational schemas R(ABC) and S(CDE), let r(R) and s(S) be the relations corresponding to R and S respectively as the following:

R
A B C
a1 b1 c1
a3 b3 c3


S
C D E
c1 d1 e1
c2 d2 e2

a. please give the result of the Cartesian product of R and S, R X S.
b. please give the result of R join S, R ?R.C = S.C S.
c. please give the result of R natural join S, R * S.
d. please give the result of R semi-join S, R ? S.
e. please give the result of S semi-join R, S ? R.
f. please give the result of R left outer join S, R =? S.
g. please give the result of R Right outer join S, R ?= S.
h. please give the result of S left outer join R, S =? R.
i. please give the result of S right outer join R, S ?=R.
j. please give the result of R full outer join S, R =?= S.

Explanation / Answer

a) Cartesian product of R and S, R X S
=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
a1 b1 c1 c2 d2 e2
a3 b3 c3 c1 d1 e1
a3 b3 c3 c2 d2 e2

b)   result of R join S, R ?R.C = S.C S

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1

c)  result of R natural join S, R * S.

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1

d) result of R semi join S, R * S.

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1

e) result of S semi join R, R * S.

=> D E S.C S.C A B
d1 e1 c1 c1 a1 b1


f) result of R left outer join S

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
a3 b3 c3 N N N

N means NULL

g) result of R Right outer join S

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
N N N c2 d2 e2

N means NULL

h) result of S left outer join R

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
c2 d2 e2 N N N

N means NULL

i)   result of S right outer join R

=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
N N N a3 b3 c3

N means NULL

j) result of R full outer join S
=> A B R.C S.C D E
a1 b1 c1 c1 d1 e1
c2 d2 e2
   a3 b3 c3

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote