Say we have three entities in our environment, Teacher, Student and Course.
In this relationships, each relationship could be inferred from the two others, for example to know which Students are being taught by Teacher T1, go through the relationship between Teacher and Course to see what Courses are being taught by the teacher T1, and then go through the relationship between Course and Student to see which Students has taken these Courses. These Students are the ones that are being taught by teacher T1.
So we don't need an explicit relationship between Student and Teacher, because "Conceptually" this relationship exists.
Finally the question is:
In Conceptual Design is it necessary to show all the three relationships?
And as an extra information, how would it be in Logical Design (designing database tables and relationships), should the relationship remain as an inferred relationship or should be explicitly defined ?
An entity may be involved in any number of relationships, and each relationship may be of any degree.
Conceptual, logical and physical data models ER models and data models are typically drawn at up to three levels of detail: Conceptual data model: The highest-level view containing the least detail.
There are 3 different types of relations in the database: one-to-one. one-to-many, and. many-to-many.
There can be more than one relationships between two entities. Your first linking table is not required. The DepartmentID in DepartmentEmploys can simply be a FK in the Employee table. Also, the second linking table is acceptable only if a Department can have multiple Employee as managers.
Here is an example,
Conceptual (using NORMA)
Teacher teaches Course
Student takes Course
Teacher tutors Student on Course
Constraints
For each Teacher and Course, that Teacher tutors some Student on that Course if and only if that Teacher teaches that Course.
For each Student and Course, some Teacher tutors that Student on that Course if and only if that Student takes that Course.
Logical
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With