04 — Practice solutions
These are independently written explanations, not an official marking scheme.
04A
Candidate keys are {BookID} and {ISBN}. ISBN is the secondary/alternate key under the school’s convention. (BookID, Title) is not minimal because BookID alone identifies a record, so it is not a candidate key.
Reasoning
The question explicitly guarantees each BookID and ISBN is unique; use that rule rather than assumptions about library copies. A candidate must also be minimal. Test the proposed pair by removing Title: if BookID still identifies the record, Title was unnecessary.
04B
Both bookings have identical values for all three key fields and cannot coexist under that primary-key constraint. Give each booking a unique BookingID, or add a suitable trip/booking identifier that genuinely distinguishes the occurrences. A timestamp works only if uniqueness is guaranteed at its stored precision. Booking.VehicleNo is a foreign key referencing Bus.VehicleNo; a non-null value must identify an existing bus.
Reasoning
Construct a counterexample rather than saying the key is “not suitable”. Two bookings with the same vehicle, customer and date are now allowed; both receive the same proposed key. The design needs a distinguishing occurrence identifier, not another descriptive customer field.