Reputation: 351
i try to understand ER diagrams and i came across an example that i'm not sure how to "look" at it..
What is the difference between the above and this diagram:
From what i have learned, the last diagram says "for every couple of school and teacher, there is one and only course" . So, if i have 3 schools, 3 teachers and 3 courses, there will be 9 triplets in Teaches relationship. What the first diagram changes? what kind of 2 triplet that exist in Teaches in the last diagram, can't be in the first diagram?
I try to first look at the diagram without constraints.So i have maximum 27 triplets (for the above example).After that, there is an order of what to do? can i first can put the rounded arrow of Course, of first to put the regulat arrow to teacher?
Upvotes: 1
Views: 6020
Reputation: 17964
The difference between two diagrams is the joint type of teacher
and the relation teaches
, which represents a
Many-to-One
Partial
relationship in first diagram and a
Many-to-Many
Partial
relationship in the second one.
Let R
be a relationship set between entity sets A
and B
. The
participation of A
is total
if every entity of A
must participate in at least one relationship in R
. Otherwise, the participation of A
is partial
.
Consider the simple diagram below:
The line connecting A and R may:
Upvotes: 1