Q1. Choose a key and write the dependencies for the following Grades:
GRADES(Student_ID, Course#, Semester#, Grade)
Key is :
Student_ID, Course#, Semester#,
Student_ID, Course#, Semester# -> Grade
Q2. Choose a key and write the dependencies for the LINE_ITEMS relation:
LINE_ITEMS (PO_Number, ItemNum, PartNum, Description, Price, Qty)
Key can be: PO_Number, ItemNum
PO_Number, ItemNum -> PartNum, Description, Price, Qty
PartNum -> Description, Price
Q3. What normal form is the above LINE_ITEMS relation in?
First off, LINE_ITEMS could not be in BCNF because:
not all determinants are keys.
next: it could not be in 3NF because there is a transitive dependency:
PO_Number, ItemNum -> PartNum
PartNum -> Description
Therefore, it must be in 2NF, we can check this is true because:
the key of PO_Number, ItemNum determines all of the non-key attributes however, PO_Number by itself and ItemNum by itself can not determine any other attributes.