Re: Please explain identifying/non-identifying relationships
Posted by: Andrew Simkovsky
Date: September 05, 2013 05:16PM

Identifying relationship - where the child entity's identity/existence relies solely on the parent entity. No parent entity means no child entity. For example, if you delete an order (order table), you probable want all the order's line items to disappear as well (order_line_item), because line items without an order are pointless. So an order line item's identity is solely dependent on a matching order existing.

Non-identifying relationship - the child entity can stand on its own without the parent entity. For example, if you have an author table and a book table. Maybe you want to store data about a book, but you don't know who the author is. The book's identity/existence is independent of having the author information.


For an identifying relationship, you put the primary key column from the parent into the primary key column of the child (along with other columns needed to provide uniqueness).

For a non-identifying relationship, you put the primary key column of the parent into the table of the child, but not in the primary key.

Andrew Simkovsky
More mysql forums (and other databases):
http://www.dbtekpro.com/forums
Brand new! Just post!

Options: ReplyQuote


Subject
Written By
Posted
Re: Please explain identifying/non-identifying relationships
September 05, 2013 05:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.