non-identifying and identifying
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.
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.
A non-identifying relationship is one where the child can be identified independently of the parent ( Account - AccountType)
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.
Let’s take a real time example of a book storing system. In the system, a book belongs to an owner, and an owner can own multiple books. But the book can also exist without the owner and it can change the owner. Thus the relationship between a book and an owner is a non-identifying relationship.
Now suppose one intends to keep a record of chapters included in a book. We know that chapters will only exist when a book exists. Thus the relationship between a book and its chapters is an identifying relationship.
In database terms, relationships between two entities may be classified as being either identifying or non-identifying. Identifying relationships exist when the primary key of the parent entity is included in the primary key of the child entity. On the other hand, a non-identifying relationship exists when the primary key of the parent entity is included in the child entity but not as part of the child entity’s primary key. In addition, non-identifying relationships may be further classified as being either mandatory or optional. A “mandatory” non-identifying relationship exists when the value in the child table cannot be null. On the other hand, an “optional” non-identifying relationship exists when the value in the child table can be null.
原文:https://www.datanamic.com/support/relationshiptypes.html
non-identifying and identifying的更多相关文章
- Selenium Xpath Tutorials - Identifying xpath for element with examples to use in selenium
Xpath in selenium is close to must required. XPath is element locator and you need to provide xpath ...
- track message forwards, avoiding request loops, and identifying the protocol capabilities of all senders along the request/response chain
https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html The TRACE method is used to invoke a remote, ...
- 14.8.3 Identifying the File Format in Use 确认使用的文件格式;
14.8.3 Identifying the File Format in Use 确认使用的文件格式: 如果 你启用一个不同的文件格式使用 innodb_file_format configurat ...
- Identifying Duplicate Indexes
本文是在阅读<Troubleshooting SQL Server>->Chapter 5: Missing Indexes->Identifying Duplicate In ...
- 关于er模型中的identifying relationship or non-identifying relationship
最近,主要负责项目管理和领域模型设计方面的工作,昨天在将UML类图转换为ER模型的时候,发现有identifying relationship or non-identifying relations ...
- 单细胞数据高级分析之构建成熟路径 | Identifying a maturation trajectory
其实就是另一种形式的打分. 个人点评这种方法: 这篇文章发表在nature上,有点奇怪,个人感觉创新性和重要性还不够格,工具很多,但是本文基本都是自己开发的算法(毕竟satji就是搞统计出身的). 但 ...
- 数据库-identifying 与non-identifying realtionship 区别
MySQL Workbench 或者是 E-RWin等进行数据库建模时,通常会对数据表进行关联操作,即设置表与表之间的关系 1:1 1:n m:n,而它们具有 identifying realtion ...
- Identifying a distributed denial of service (DDOS) attack within a network and defending against such an attack
The invention provides methods, apparatus and systems for detecting distributed denial of service (D ...
- ORA-19625: error identifying file XXXXX
在RMAN备份全库的时候,将归档日志一同进行备份,结果报如下错误,可以看到是无法获得对应归档日志的报错: RMAN: ========================================= ...
- Methods for Identifying Out-of-Trend Results in Ongoing Stability Data
python机器学习-乳腺癌细胞挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...
随机推荐
- 实验室系统tomcat 6 java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
- PAT甲级——A1107 Social Clusters
When register on a social network, you are always asked to specify your hobbies in order to find som ...
- pywebview gui='cef' 生成app报错—— 中断点 已到达中断点
pywebview是一个轻量级跨平台包装器,允许在其自己的本机GUI窗口中显示HTML内容.它提供了桌面应用程序中Web技术的强大功能,隐藏了GUI基于浏览器的事实.这个玩意儿好啊,可以直接让我们做的 ...
- 统计学习笔记之k近邻法
1.kNN算法的思想:给定一个训练数据集,对新的输入实例,在训练集中找到与该实例最近邻的k个实例,这k个实例的多数属于某类,就把输入实例分为这个类. 2.算法 (1)根据给定的距离度量,在训练集T中找 ...
- Mybatis-generator/通用Mapper/Mybatis-Plus对比
mybatis-plus-boot-starter和mybatis-spring-boot-starter冲突导致MapperScan失效问题还没有解决,只能不用mybatis-plus-boot-s ...
- 2018-8-10-win10-uwp-如何判断一个对象被移除
title author date CreateTime categories win10 uwp 如何判断一个对象被移除 lindexi 2018-08-10 19:16:50 +0800 2018 ...
- Hadoop 2.x 版本中的依赖 jar
- 【期望DP】[zoj3329]One Person Game
题描: 有三个均匀的骰子,分别有k1,k2,k3个面,初始分数是0, 当掷三个骰子的点数分别为a,b,c的时候,分数清零,否则分数加上三个骰子的点数和, 当分数>n的时候结束.求需要掷骰子的次数 ...
- uoj51 元旦三侠的游戏
题意:询问a,b,n.每次可以a+1或b+1,保证a^b<=n,不能操作者输.问先手是否赢? n<=1e9. 标程: #include<cstdio> #include< ...
- csps模拟测试74梦境,玩具,飘雪圣域题解
题面:https://www.cnblogs.com/Juve/articles/11679226.html 梦境: 其实还是挺水的,排序错了过不了样例,打了个二分图匹配就跑了 #include< ...