The Deployer

September 26, 2008

Difference between identifying and non identifying relationship

Filed under: Featured Articles, MySQL — Lucian Daniliuc @ 17:51

A 1:M (one to many) non-identifying means that the associated record in the -one- table is not a parent of the associated record in the -many- table, but rather just related.

An example:

an identifying 1:M would be a building which has many rooms. The -one- table carries data about the building .. e.g., street address, number of floors, name. The -many- table carries data about the rooms in the building .. e.g., room number, capacity, special characteristics. The room cannot exist without the building, therefore this 1:M is an identifying relationship.

a non-identifying 1:M would be a DVD which has many renters. The -one- table carries data about the DVD… e.g., the movie name, the artist. The -many- table carries data about each person who rents that DVD .. e.g., name, price paid. The DVD can exist on its own, without ever having been rented, and the person can exist on her own, without ever having rented any DVD, therefore this 1:M
is a non-identifying relationship.

Donna Hinshaw

Source: http://lists.mysql.com/mysql/173538

Powered by WordPress