CS FundamentalsHardGATE CS · Product placement
R(A, B) has 300 tuples and S(B, C) has 50 tuples, where S.B is the primary key of S and R.B is a foreign key referencing it (NOT NULL). What are the minimum and maximum possible numbers of tuples in R ⋈ S?
- A. min 50, max 300
- B. min 0, max 50
- C. min 0, max 15000
- D. min 300, max 300
Correct answer: D. min 300, max 300
Every R tuple must match exactly one S tuple (the FK guarantees existence, the key uniqueness), so the join has exactly 300 tuples.
More DBMS and SQL questions
- Table P(x) rows: (1), (2), (2), (3), (NULL). Table Q(x) rows: (2), (3), (3), (NULL), (4). What does this query return? sql SELECT COUNT()…
- R has 500 tuples in 50 blocks and S has 4000 tuples in 200 blocks. With only enough memory for one block of each relation, how many block…
- Under BOTH wait-die and wound-wait deadlock prevention, which transaction can be rolled back when a lock conflict occurs?
- Table Acct(no, branch, bal) rows: (101, 'Agra', 500), (102, 'Agra', 1500), (103, 'Bhopal', 700), (104, 'Bhopal', 700), (105, 'Cuttack'…
- R(A, B, C, D, E, F) with functional dependencies E → B, F → A, B → A, C → E is decomposed into R1(A, B, F), R2(B, D, E), R3(C, E). Which…
- On R(A, B, C, D, E), F = {AB → C, DE → C, B → C} and G = {B → DE, E → AC, D → A}. Which statement is correct? ("F covers G" means every FD…