0

I am trying to recreate a university database and have created the following EER model. I am still fairly new to MySQL and was just wondering if there should be any changes made to this model in order for it to work correctly. I am not overly sure how to design tables such as the "prerequisite" and "major" tables specifically.

Thanks for any advice

Here's the EER:

enter image description here

dgilperez
  • 10,716
  • 8
  • 68
  • 96
Godin1
  • 71
  • 1
  • 11
  • Your prerequisite should be an int (following your existing design pattern). But in real life, isn't a prerequisite a course, hence a join back to itself? Same comment about Major and its primary key. Its core courses and electives should be another table to relate N:M of Majors:Courses – AgRizzo Nov 13 '13 at 14:16
  • So do you mean that the core courses and electives in the "major" table should both be their own table and then join back to major? – Godin1 Nov 13 '13 at 18:55
  • I would remove the CoreCourses and Electives fields from the Major table. Then create a new table with 3 fields: MajorName (foreign key to Major Table), CourseID (foreign key to COURSE table) and 'type' which would have the values: 'core' or 'elective'. The primary key would be the composite of the MajorName and CourseID. – AgRizzo Nov 13 '13 at 22:05

0 Answers0