SQL ER关系集

The participation constraint specifies whether the existence of an entity depends on its being related to another entity via the relationship type. This constraint specifies the minimum number of relationship instances that each entity can participate in.
There are two types of participation constraints: Total and Partial
Total Participation
Total Participation is when each entity in the entity set occurs in at least one relationship in that relationship set.
For instance, consider the relationship borrower between customers and loans. A double line from loan to borrower, as shown in figure below indicates that each loan must have at least one associated customer.

enter image description here

Partial Participation
Partial Participation is when each entity in the entity set may not occur in at least one relationship in that relationship set. For instance, If a company policy states that employee (manager) must manage a department, However every employee may not manage a department, so the participation of EMPLOYEE in the MANAGES relationship type is partial, meaning that some or part of the set of employee entities are related to some department entity via MANAGES, but not necessarily all.
Note: Partial Participation is represented by single line connecting entities in relationship.

你可能感兴趣的:(SQL ER关系集)