美文网首页
SQL ER关系集

SQL ER关系集

作者: 狮心王Richards | 来源:发表于2017-10-01 22:11 被阅读0次

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关系集

      本文链接:https://www.haomeiwen.com/subject/qraaextx.html