

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Homework 2 Solutions
Notice that for some questions the provided answer may not be the only correct answer. We will look through your answers, if different, to see if they are correct or not.
Musician (SSN, address, s-name) Instrument (instr-id, i-name, key) The next two relation schemas would be Song (song-id, title, p-name) Publicist (p-name, p-agency) Or Song (song-id, title) Publicist (p-name, p-agency, song-id) Weak entity: Single (track-name, song-id, year) Is-A (ER-style): Band-Leader (SSN, band-name) Many-to-many relationship: Performs (SSN, song-id) Plays (SSN, instr-id)
2) If there is atmost one nontrivial FD it must be the FD K -> R' where key is set of key attributes and R' is the set of all other attributes. If the given FD was not of this form then we can always use Armstrongs Axioms of FDs to reach to these FDs. The FD K -> R' satisfies the condition that LHS of the FD should be a superkey. Hence the given schema is in BCNF.
3)
4) X->Y: cannot say anything X->->Y cannot say anything YZ->X does not hold since in the tuples (123) and (423), the YZ values are the same by X values differ. YZ ->->X can not say anything Y->Z does not hold (as in tuples (533) and (534) Y->->Z can not say anything. the tuples (533) and (534) could shed some light if their X values differed but that is not the case, here.
Z and XY->W, and YZW is still not in BCNF (w->Y). So decompose further to XZ,
YW, ZW and add the XYZ and XYW to get the final BCNF , lossless and join- preserving.