retagged by
1,222 views
0 votes
0 votes

Suppose relations R(A,B) and S(B,C,D) have the tuples shown below:

R =
A B
1 2
3 4
5 6
S =
B C D
2 4 6
4 6 8
4 7 9

Compute the result of the join query:

     SELECT A, R.B, C, D
     FROM R, S
     WHERE R.B = S.B

Then, identify which of the following tuples is in the result.

a) (1,4,7,9)
b) (5,6,4,6)
c) (3,4,7,9)
d) (3,4,2,6)
retagged by

2 Answers

2 votes
2 votes

I think options are wrong, correct output will be: 

2 votes
2 votes

The answer is c. (3,4,7,9).

The result of the query is

A R.B C D
1 2 4 6
3 4 6 8
3 4 7 9

Related questions