User
User

Reputation: 13

An associative Entity with optional participation on one side and mandatory participation on the other

I get confused sometimes when trying to understand business rules and translating them into ERD using Crow's Foot Notation.

This is the Business Rule:

This is what I did:

This is what I did

My Questions:

Upvotes: 1

Views: 113

Answers (1)

Christophe
Christophe

Reputation: 73376

Yes it is correct, but:

  • Your initial many-to-many says that a session can have several candidates but may have none, but that candidates mut have at least one session. Your second diagram says the same thing.
  • Both diagrams require a candidate to have at least one session. So according to the diagram, a candidate must attend a session. But the narrative says "Candidates can pay a fee to attend a training session". So according to the narrative, it should be optional also.

When using an associative table, the one side of the decomposition should have mandatory participation. If it would not be mandatory, you could have rows in the associative table that corresponds to not have a conter-part and hence do not correspond to a valid relationship between the two associated entities. Imagine for example that the student would receive a grade for each of the enrolments. If one side would be missing, the grade would then be completely irrelevant.

Upvotes: 0

Related Questions