Note that there are some explanatory texts on larger screens.

plurals
  1. POStill Confused About Identifying vs. Non-Identifying Relationships
    primarykey
    data
    text
    <p>So, I've been reading up on identifying vs. non-identifying relationships in my database design, and a number of the answers on SO seem contradicting to me. Here are the two questions I am looking at:</p> <ol> <li><a href="https://stackoverflow.com/questions/762937/whats-the-difference-between-identifying-and-non-identifying-relationships">What's the Difference Between Identifying and Non-Identifying Relationships</a></li> <li><a href="https://stackoverflow.com/questions/1216805/trouble-deciding-on-identifying-or-non-identifying-relationship">Trouble Deciding on Identifying or Non-Identifying Relationship</a></li> </ol> <p>Looking at the top answers from each question, I appear to get two different ideas of what an identifying relationship is.</p> <p>The first question's response says that an identifying relationship "describes a situation in which the existence of a row in the child table depends on a row in the parent table." An example of this that is given is, "An author can write many books (1-to-n relationship), but a book cannot exist without an author." That makes sense to me.</p> <p>However, when I read the response to question two, I get confused as it says, "if a child identifies its parent, it is an identifying relationship." The answer then goes on to give examples such as <a href="http://en.wikipedia.org/wiki/Social_Security_number" rel="nofollow noreferrer">Social Security Number</a> (is identifying of a Person), but an address is not (because many people can live at an address). To me, this sounds more like a case of the decision between primary key and non-primary key.</p> <p>My own gut feeling (and additional research on other sites) points to the first question and its response being correct. However, I wanted to verify before I continued forward as I don't want to learn something wrong as I am working to understand database design. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload