Consider a relation with schema R(A,B,C,D) and an unknown set of functional dependencies. In each of the cases below, give a set of functional dependencies that is consistent with the conditions given.
Student(sid, name, email), Course(cid, name, instructor, room), Enrolls(sid, cid, grade)
Underlined attributes denote keys. In Enrolls, sid and cid are foreign keys in Student and Course respectively. The following two constraints hold: each student is enrolled in some course, and each course has at least one student enrolled.
- Design a DTD for exporting this data in XML to the dean's office. The dean wants to see the data grouped by courses and needs to have access to all the information in the database.
- Design a DTD for exporting this data to a student's association. Group the data now by students, and hide the grade.
- Give an example of a database instance for your schema and show both its XML views according to the DTD at the previous two points.