IDENTIFYING AND NON-IDENTIFYING RELATIONSHIPS i... 亦凉 2022-01-13 08:04 143阅读 0赞 [2019独角兽企业重金招聘Python工程师标准>>> ][2019_Python_] ![hot3.png][] =================================================================== 简单翻译了一下(蓝色), 如果其中有错误 OR 不足之处, 完全不用客气, 请指出~ 原文参考: http://blog.csdn.net/dbigbear/article/details/2116771 =================================================================== An identifying relationship means that the child table cannot be uniquely identified without the parent. For example, you have this situation in the intersection table used to resolve a many-to-many relationship where the intersecting table's Primary Key is a composite of the left and right (parents) table's Primary Keys. identifying关系意思是: 如果没有父表, 子表无法独立定义, 举个例子: 有这么个情况,你建立了一个关系表, 用于解决多对多的关系, 而且这张关系表的主键是由左表和右表(父表)的主键复合组成 . Example... Account (AccountID, AccountNum, AccountTypeID) PersonAccount (AccountID, PersonID, Balance) Person(PersonID, Name) The Account to PersonAccount relationship and the Person to PersonAccount relationship are identifying because the child row (PersonAccount) cannot exist without having been defined in the parent (Account or Person). In other words: there is no personaccount when there is no Person or when there is no Account. Account 和 PersonAccount 的关系, 以及 Person 和 PersonAccount 的关系, 都是identifying关系, 因为(Account or Person)中未定义的数据不可能在PersonAccount中存在.换句话说: 如果没有Person或者没有Account, 就不会有personaccount . A non-identifying relationship is one where the child can be identified independently of the parent ( Account - AccountType) non-identifying关系: 字表可以独立定义, 与父表无关 . Example... Account( AccountID, AccountNum, AccountTypeID ) AccountType( AccountTypeID, Code, Name, Description ) The relationship between Account and AccountType is non-identifying because each AccountType can be identified without having to exist in the parent table. Account 和 AccountType之间的关系是non-identifying关系, 每一条定义在AccountType中数据不需要必须存在父表中 . You can define the relationship type (identifying/non identifying) in the DeZign for Databases in the relationship dialog. Double click on the relationship line in the diagram window to display the relationship dialog. mysql数据库设计软件mysqlworkbench中, identifying关系和 non-identifying关系的表现形式 : non-identifying关系: ![105954_54zc_180839.png][] identifying关系: ![110018_a8Qp_180839.png][] 转载于:https://my.oschina.net/liuhui1990/blog/37688 [2019_Python_]: https://my.oschina.net/u/2663968/blog/3061697 [hot3.png]: /images/20220113/bcb214eb75d64859910d12c7f3b37c01.png [105954_54zc_180839.png]: /images/20220113/4e4415d2f9664679a4915635165542b2.png [110018_a8Qp_180839.png]: /images/20220113/6289677351fa4dab818ebb8fa74dc037.png
还没有评论,来说两句吧...