Question

I'm doing some exercises in my textbook, and meet this ER diagram:

enter image description here

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?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top