Try this:
Enrollments: Student ID, Course No
Score: Assignment No, Student ID, Course No.
Note: Some designers frown on composite primary keys. Not me.
Question
I'm doing some exercises in my textbook, and meet this ER diagram:
I tried to convert above diagram into relational database schema, but I think I doesn't make any sense:
• Assignments: assignmentNo, grade
• Enrollments: assignmentNo
• Students: studentID, takeAssignmentNo
• Courses: dept, courseNo, offerAssigmentNo
Can you please explain how should I understand this diagram? What is its practical usage? How can I implement score
relationship in SQL Server, or convert it into relational database schema?
Solution
Try this:
Enrollments: Student ID, Course No
Score: Assignment No, Student ID, Course No.
Note: Some designers frown on composite primary keys. Not me.