Entity relationships

yes, it’s allowed

however, i personally would not use a separate synthetic id for the section subject table, rather, a composite PK consisting of section_id and subject_id

then there would be a corresponding composite FK in the school class table

one benefit of this is that it allows you to join the school class table (let’s say, for a particular teacher) to the subject table directly, to list all the subjects they teach


Thank you for helping me! @m_hutley @benanamen @DaveMaxwell @r937

Do I need for a separate table for schedules or should I just put it in the SchoolClass

Here’s what I’ve done.

and could the schedules table be more normalized? Because sometimes, the days column have values like Mon, Tue, Fri in a single cell.

This sounds very much like you are working with one of the exercises/examples from:

Coronel, Carlos & Morris, Steven, 2019, Database Systems: Design, Implementation, & Management , 13th Edition, Cengage Learning Inc., Boston, Massachusetts. ISBN 9781337627900

A very good textbook that I currently use to teach database design. I suggest that you consult the book for some fairly well worked examples, including this one.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.