Domanda

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?

È stato utile?

Soluzione

Try this:

Enrollments: Student ID, Course No

Score: Assignment No, Student ID, Course No.

Note: Some designers frown on composite primary keys. Not me.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top