Identifying vs non-identifying has nothing to do with identity. Simply ask yourself can the child record exist without the parent? It has to do with whether the primary key of the child (can include more than one coumn) includes the foreign key of the parent. In the non-identifying relationship the child's primary key(PK) MUST NOT include the foreign key(FK).
Ask yourself this question
- Can the foriegn key from the parent be included in the primary key of the child?
or asked in the opposite way
- Can the child record exist without the parent record?
These are the same question, just put differently. If the FK must not be included in the PK meaning the child can exist without the parent, then it is non-identifying. Otherwise it is identifying. As noted in the comments more clearly: If a child can exist without the parent, then it is non-identifying.
One-to-one identifying relationship
Social security numbers fit nicely in to this category. SSNs cannot exist with out a person. The person_id would be the PK for the person table, including columns such as a name and address. (let's keep it simple). The social_security_number table would include the ssn column and the person_id column as a foreign key. Since this FK could be the PK for the social_security_number table it is an identifying relationship.
One-to-one non-identifying relationship
At a large office complex you might have an office table that includes the room numbers by floor and building number with a PK, and a separate employee table. The employee table (child) has a FK which is the office_id column from the office table PK. While each employee has only one office and (for this example) every office only has one employee this is a non-identifying relationship since offices can exist without employees, and employees can change offices or work in the field.
One-to-many relatoinships
One-to-many relationships can be categorized easily by asking the same question.
Many-to-many relationships
Many-to-many relationships are always identifying relationships. This may seem counter intuitive, but bear with me. Take two tables libary and books, each library has many books, and a copy of each book exists in many libraries.
Here's what makes it and identifying relationship: In order to implement this you need a linking table with two columns which are the primary keys of each table. Call them the library_id column and the ISBN column. This new linking table has no separate primary key, but wait! The foreign keys become a multi-column primary key for the linking table since duplicate records in the linking table would be meaningless. The links cannot exist with out the parents; therefore, this is an identifying relationship. I know, yuck right?
Most of the time the type of relationship does not matter.
All that said, usually you don't have to worry about which you have. Just assign the proper primary and foreign keys to each table and the relationship will discover itself.
相关推荐
Step 12: Identifying and Protecting User Accounts Step 13: Authorizing Transactions Step 14: Storing Transaction Data Step 15: Using the Data Store Step 16: Protecting the Data Store Step 17: ...
2 Relationship between processes..............................................................................................- 14 - 2.1 Configuration Management..........................................
Identifying large-scale strategic decisions that affect most software elements Coordinating and organizing system components and subsystems Managing memory and resources Defining how objects can...
"I found Real Time UML, Third Edition, to provide an informative and practical application of UML 2.0 to the development of real-time ...Representing and identifying threads Mechanistic design patterns
Allows identifying a session wrapper by an RTC handle, makes use of ht.h SessionContainer.h - .. Resource / UI definitions files --------------------------------- newres.h - resource defines ...
Identifying a visitor 21-1. addslashes() 21-2. output 21-3. output with enabled magic_quotes_sybase 21-4. The ugly way 21-5. automating the conversion process 21-6. using get_magic_quotes_gpc 21-7. ...
Designing OOP Solutions: Identifying the Class Structure Designing OOP Solutions: Modeling the Object Interaction Designing OOP Solutions: A Case Study Introducing the .NET Framework and Visual ...
Identifying-Medical-Diagnoses-and-Treatable-Diseases-by-Image-Based_2018_Cel.pdf
Chapter 5: Identifying Resources Chapter 6: Versioning REST APIs Chapter 7: Encoding Actions on Resources Chapter 8: Implementing Synchronous and Asynchronous REST APIs Chapter 9: Documenting REST ...
This book provides a framework for success by identifying the "hidden" work as part of moving to the cloud. At a more practical, level there is an incredible hunger for simple to follow, "how-to" ...
Identifying Encrypted Malware Traffic with Contextual Flow Data 识别加密网络流量中包含的威胁会带来一系列独特的挑战。监视此流量中是否存在威胁和恶意软件很重要,但是必须以保持加密完整性的方式进行监视。...
--rdpenalty <0..2> penalty for 32x32 intra TU in non-I slices. 0:disabled 1:RD-penalty 2:maximum. Default 0 Slice decision options: --[no-]open-gop Enable open-GOP, allows I slices to be non-IDR. ...
利用Windows自带的声卡采集器,通过麦克风将声音采集。将录制的声音分为一系列频率,将基频进行比较,从而进行简单的声音识别。
5. Non-repudiation: In reference to digital security, nonrepudiation means to ensure that a transferred message has been sent by correct sender and received by correct receiver. This is done mainly ...
performance by identifying frequently executed regions and by aiding in scheduling instructions. Profile-based predictors require a time-consuming and inconvenient compile-profile-compile cycle in ...
第二周编程作业源码
In this paper, we propose a novel density based spatial clustering algorithm called K-DBSCAN with the main focus of identifying clusters of points with similar spatial density. This contrasts with ...
Identifying an Emotional State from Body Movements Using Genetic-Based Algorithms Chapter 45. Particle Swarm Optimization with Single Particle Repulsivity for Multi-modal Optimization Chapter 46. ...
What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The entity upon which a ...