Multiple-cardinality relationships in business objects

The adapter supports 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. For a parent to contain more than one child, the foreign keys that establish the relationship are stored in the 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.

The figure titled "Multiple-cardinality business object relationship" illustrates a multiple-cardinality relationship. In the example, ParentId in the three ChildBOName boxes is the simple attribute that contains the parent’s primary key, and Child1 in the ParentBOName box is that attribute that represents the array of child business objects.

This figure shows one box on the left with one column. The column heading is ParentBOName. Under the heading are two rows. The first row is called ID and the second is Child(1). On the right are three one-column boxes that each have a heading of ChildBOName and a row called ParentID. The three boxes are connected by horizontal lines to a vertical line. An arrow from the vertical line points to the box on the left.

Multiple cardinality business object relationship

A multiple cardinality relationship could be an N=1 relationship. Some applications store one child entity so that the parent-child relationship is stored in the child rather than in the parent. In other words, the child contains a foreign key whose value is identical to the value stored in the parent’s primary key.

Applications use this type of relationship when child data does not exist independently of its parent and can be accessed only through its parent. Such child data requires that the parent and its primary key value exist before the child and its foreign key value can be created. The figure titled "Multiple cardinality relationship with N=1" shows this type of relationship.

This figure has a box on the left with one column. the column heading is ParentBOName. There are two rows below the heading. The first row says ID and the second row says Child(1). On the right is a one-column box with the heading ChildBOName. One row under the heading says ParentID. An arrow connects the ParentID row to the ID row in the box on the left.

Multiple cardinality relationship with N=1


Terms of use |

Last updated: Thu Mar 23 13:24:30 2006

(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)