The idea of many in a one-to-many relationship does not mean that there has to be more than one instance of the child connected to a given parent. Instead the many in one-to-many really means that there are zero, one, or more instances of the child paired up to the parent.
Cardinality is the relational property that defines exactly how many instances appear in a child table for each corresponding instance in the parent table. IDEF1X and IE differ in the symbols that are used to specify cardinality. However, both methods provide symbols to denote one or more, zero or more, zero or one, or exactly N, as explained in the following table:
|
Cardinality Description |
IDEF1X Notation Identifying Non-identifying |
IE Notation Identifying Non-identifying |
|---|---|---|
|
One to zero, one, or more |
|
|
|
One to one or more |
|
|
|
One to zero or one |
|
|
|
Zero or one to zero, one, or more (non-identifying only) |
|
|
|
Zero or one to zero or one (non-identifying only) |
|
|
Cardinality lets you specify additional business rules that apply to the relationship. In the following figure, the business has decided to identify each MOVIE COPY based on both the foreign key “movie-number” and a surrogate key “copy-number.” Also, each MOVIE is available as one or more MOVIE COPYs. The business has also stated that the relationship is identifying, that MOVIE COPY cannot exist unless there is a corresponding MOVIE.

The MOVIE-MOVIE COPY model also specifies the cardinality for the relationship. The relationship line shows that there will be exactly one MOVIE, and only one, participating in a relationship. This is because MOVIE is the parent in the relationship.
By making MOVIE-COPY the child in the relationship (shown with a dot in IDEF1X), the business defined a MOVIE-COPY as one of perhaps several rentable copies of a movie title. The business also determined that to be included in the database, a MOVIE must have at least one MOVIE-COPY. This makes the cardinality of the is available as relationship one-to-one or more. The P symbol next to the dot represents cardinality of one or more. As a result, you also know that a MOVIE with no copies is not a legitimate instance in this database.
In contrast, the business might want to know about all of the MOVIEs in the world, even those for which they have no copies. So their business rule is that for a MOVIE to exist (be recorded in their information system) there can be zero, one, or more copies. To record this business rule, the P is removed. When cardinality is not explicitly indicated in the diagram, cardinality is one-to-zero, one or more.
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |