0

I am a novice programmer, currently attempting to create a Java EE web application for a dissertation project.

I am currently designing that relational database for my web application and I have created an E-R Diagram for the database:

E-R Diagram

My query relates to the TeachingClass table. Each class can be taught by one or more Employees (normally a max of 3) and each class can contain one or more pupils (normally around 25). Each teaching class relates to exactly one course, however, there might be a several TeachingClass running simultaneously for each particular course.

From my E-R diagram can someone please confirm that I have set the Teaching Class table correctly, or should I be using two additional joining tables:

  • One table between TeachingClass and Pupil
  • One table between TeachingCLass and Employee.

Thanks in advance for any feedback/recommendations provided.

reaanb
  • 9,806
  • 2
  • 23
  • 37
Andy Mac
  • 21
  • 2
  • 4
  • Hi. Constraints (FKs, cardinalities) fall out of designs after you have decided what entities & relationships you need. First just find which (each getting a table) you need to capture your entire state. Every relationship should be described by a statement saying how its values (& entities so identified) are related. Give a reference for the (so-called) ER method you are using. PS Please use text for text (including in tables & ER diagrams). Here, give minimal DDL (possibly pseudo-code). (Minimal) images should be supplemental. If you have the rep don't use links for anything necessary. – philipxy Jul 26 '18 at 22:23
  • Possible duplicate of [relationships between 3 entities in ER diagram--is a ternary enough or are 2 binaries also needed?](https://stackoverflow.com/questions/45551388/relationships-between-3-entities-in-er-diagram-is-a-ternary-enough-or-are-2-bin) – philipxy Jul 26 '18 at 22:40

0 Answers0