CS FundamentalsModerateGATE CS · PSU (ISRO/BARC)
R(A, B) = {(1, 3), (3, 2), (3, 4), (4, 2)} and S(B, C) = {(2, 5), (2, 7), (3, 6), (3, 7), (4, 5)}. How many tuples does σ_{R.B ≠ S.B}(R × S) have?
- A. 20
- B. 7
- C. 14
- D. 13
Correct answer: D. 13
R × S has 4 × 5 = 20 tuples; 7 of them have R.B = S.B (exactly the natural-join pairs), so 13 remain.
More DBMS and SQL questions
- A query optimizer rewrites σ{city='Pune'}(Customer ⋈ Orders) as σ{city='Pune'}(Customer) ⋈ Orders, where city is an attribute of Customer…
- Which change is an example of PHYSICAL data independence in the three-schema architecture?
- Teach(course, teacher, book) satisfies course ↠ teacher | book, and the course DBMS has 3 teachers and 4 books. How many tuples must Teach…
- For the schedule R1(B), R1(C), W3(A), W1(C), R2(A), W2(C), R3(B), how many distinct serial schedules are conflict-equivalent to it?
- For the schedule R1(B), W3(A), W1(B), W2(B), R2(A), W3(C), R3(C), R2(C), how many distinct serial schedules are conflict-equivalent to it?
- R(A, B, C, D, E, F) has functional dependencies F → E, E → BC, CE → F, C → F. Which of the following is the complete set of candidate keys…