CS FundamentalsHardGATE CS · Product-company placement
A clinic stores Booking(patient, specialty, doctor). Each doctor has exactly one specialty, and each patient sees exactly one doctor per specialty. Which statement is correct?
- A. Booking is in BCNF because (patient, specialty) is a key
- B. Booking is in 3NF but not BCNF, and every BCNF decomposition loses the rule (patient, specialty) → doctor
- C. Booking is not in 3NF because doctor → specialty is transitive
- D. Decomposing into (doctor, specialty) and (patient, doctor) is lossy
Correct answer: B. Booking is in 3NF but not BCNF, and every BCNF decomposition loses the rule (patient, specialty) → doctor
Keys are (patient, specialty) and (patient, doctor). doctor → specialty breaks BCNF but specialty is prime, so 3NF holds. The BCNF split (doctor, specialty), (patient, doctor) is lossless (doctor is a key of the first) but cannot check (patient, specialty) → doctor locally.
More DBMS and SQL questions
- Which serial order is conflict-equivalent to the schedule R2(A), R1(B), W3(A), W1(C), R3(C), R4(B), W4(A)?
- Classify the schedule R2(X), W1(X), W2(X), W3(X) (all transactions commit afterwards).
- Classify the schedule W1(X), W2(X), R3(X), C3, C1, C2 (Ci = commit of Ti).
- Timestamp ordering with Thomas's write rule: TS(T1) = 5, TS(T2) = 10, TS(T3) = 15, and all read/write timestamps start at 0. The…
- Timestamps: T1 = 10 (oldest), T2 = 20, T3 = 30. T2 holds an exclusive lock on X. First T1 requests X, then T3 requests X. Which is correct?
- A hospital requires at least one doctor on call. Doctors Ana and Ben are both on call. Each starts a transaction under snapshot isolation…