CS FundamentalsHardProduct placement · DBMS interview
An ER diagram has entity sets E1, E2, E3. R1 relates E1 and E2 many-to-many. R2 relates E2 and E3 one-to-many (each E3 entity relates to at most one E2). E3 has a multivalued attribute phone. What is the minimum number of relational tables needed?
- A. 6
- B. 3
- C. 4
- D. 5
Correct answer: D. 5
E1, E2 and E3 need a table each; M:N R1 needs its own table; R2 folds into E3 as a foreign key; the multivalued phone needs a separate table: 5.
More DBMS and SQL questions
- Table Att(emp, day, status) rows: ('u', 1, 'P'), ('u', 2, 'P'), ('u', 3, 'A'), ('u', 4, 'P'), ('u', 5, 'P'), ('u', 6, 'P'), ('v', 1, 'A')…
- Table Product(pid, cat, price) rows: (1, 'X', 10), (2, 'X', 20), (3, 'Y', 20), (4, NULL, 30), (5, 'Y', NULL), (6, 'Z', 5). What does this…
- Classify the schedule W3(B), R2(A), R3(B), W2(A), W1(B), R1(B).
- In a B+ tree every internal node can have at most 34 children and every leaf can hold at most 30 keys. With exactly 4 levels (root at…
- Table Stu(sid, sname) rows: (1, 'Om'), (2, 'Pia'), (3, 'Raj'), (4, 'Sia'). Table Takes(sid, cid, marks) rows: (1, 'C1', 80), (1, 'C2'…
- Relations R (1000 blocks) and S (500 blocks) are joined with block nested-loop join using M = 22 buffer blocks (M − 2 for the outer…