Multiple-cardinality relationships

Typically, a business object that contains an array of child business objects has only one attribute that represents the relationship. The type of the attribute is an array of the same type as the child business objects. In order for a parent to contain more than one child, the foreign keys that establish the relationship are stored in each child.

Therefore, each child has at least one simple attribute that contains the parent's primary key as a foreign key. The child has as many foreign-key attributes as the parent has primary key attributes.

Because the foreign keys that establish the relationship are stored in the child, each parent can have zero or more children.

Figure 3 illustrates a multiple-cardinality relationship. In the example, parentId is the simple attribute that contains the parent's primary key, and child[n] is the attribute that represents the array of child business objects.

Figure 3. Multiple-cardinality business object relationship


Copyright IBM Corp. 1997, 2003