CS FundamentalsModerateGATE CS · PSU (ISRO/BARC)
Employee(eid, name) has a recursive one-to-many relationship 'manages' (a manager manages many employees; each employee has at most one manager). What is the minimum number of tables for this design?
- A. 0 — recursive relationships cannot be mapped
- B. 1
- C. 3
- D. 2
Correct answer: B. 1
Add a nullable foreign key mgr_eid in Employee referring to Employee itself; no separate table is needed for a 1:N recursive relationship.
More DBMS and SQL questions
- In logical query processing order, which clause of a SELECT statement is evaluated LAST?
- R(A, B, C, D, E, F) has FDs C → AD, EF → C, B → A, AD → E. Each option is a relation schema obtained by projecting R, with the…
- 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…
- A B+ tree has at most 21 children per internal node and at most 20 keys per leaf. A non-root internal node must have at least ⌈21/2⌉…
- R(A, B, C, D, E) with functional dependencies B → A, E → D, D → C is decomposed into R1(A, B), R2(A, C), R3(C, D, E). Which statement is…
- Classify the schedule R3(A), W1(B), R1(A), R3(B), W2(B), R2(A), R2(B), W3(B).