Consider the following rules and guidelines when you work with view keys and relationships:
An PowerCenter XML definition can have up to 400 views.
A view can have one primary key.
A view can be related to several other views, and a view can have multiple foreign keys.
A column cannot be both a primary key and a foreign key.
A view in a source definition does not require a key.
A view in a target definition requires at least one key.
The target root view requires a primary key, but the target root does not require a foreign key.
A target leaf view requires a foreign key, but the target leaf view does not require a primary key.
An enclosure element cannot be a key.
A foreign key always refers to a primary key in another group. You cannot use self-referencing keys.
A generated foreign key column always refers to a generated primary key column.
The relative cardinality of elements in an XML hierarchy affects how PowerCenter creates views in an XML definition. The following rules determine when elements can be part of the same view:
Elements that have a one-to-one relationship can be part of the same view.
Elements that have a one-to-many relationship can be part of the same normalized or denormalized view.
Elements that have a many-to-many relationship cannot be part of the same view.