Reputation: 13
| MatrikelNr [PK] | Stud.-Name | Klausur | Raum |
Matrikelnr = student number, Klausur = Exam name, Raum = Room.
I should get this table into 3NF, and write them as relations with primary keys underlined.
My solution:
Student (Matrikelnr, Stud.-Name)
Klausur (Matrikelnr, Klausur, Raum)
But my friend said the solution is:
Student (Matrikelnr, Stud.-Name, Klausur)
Klausur (Klausur, Raum)
Upvotes: -1
Views: 78
Reputation: 3257
Student
should only have student information.
Student(Matrikelnr,Stud.-Name)
Exam
should only have exam information.
Klausur(Klausur,Raum)
Then you will need a table to hold the many-to-many relationship (student can take many exams, and an exam is taken by many students)
StudentExam(StudentId, ExamId)
, both columns are the primary key from the other 2 tables.
Upvotes: 1