In order to determine the type and behavior of the relationships, the following questions are available when defining a relationship.
Depending on the answers for the questions, labeled Q1 to Q4 above, the relationship type and delete behavior will be determined as follows:
Q1
|
Q2
|
Q4
|
Q3
|
Relationship Type
|
Delete Behavior
|
Relationship Type in Prior Versions
|
Storage of Foreign Key
|
1
|
1
|
No
|
No
|
One-to-One
|
No records are deleted
|
One-to-One;
Referenced
|
On the component where the relationship has been created.
|
1
|
1
|
Yes
|
No
|
One-to-One
|
Record from THIS Component is deleted when the record from the RELATED Component is deleted.
|
One-to-One;
Contained by Associative
|
On the component where the relationship has been created.
|
1
|
1
|
No
|
Yes
|
One-to-One
|
Record from RELATED Component is deleted when the record from the THIS Component is deleted.
|
One-to-One;
Contained by Primary
|
On the component where the relationship has been created.
|
1
|
1
|
Yes
|
Yes
|
One-to-One
|
Record from RELATED Component is deleted when the record from the THIS Component is deleted and vice versa. This depends on which record is deleted first.
|
One-to-One
|
On the component where the relationship has been created.
|
Many
|
1
|
No
|
No
|
Many-to-One
|
No Records are deleted
|
Many-to-one;
Referenced
|
On the component where the relationship has been created
|
Many
|
1
|
No
|
Yes
|
Many-to-One
|
Records from RELATED Component are deleted when the record from the THIS Component is deleted and no other RELATED record(s) are linked to THIS record.
|
Many-to-one;
Contained by Primary
|
On the component where the relationship has been created
|
Many
|
1
|
Yes
|
No
|
Many-to-One
|
Records from THIS Component are deleted when the record from the RELATED Component is deleted.
|
Many-to-One
|
On the component where the relationship has been created
|
Many
|
1
|
Yes
|
Yes
|
Many-to-One
|
This depends on which record is deleted first. If the record from THIS Component is deleted first then the records from the RELATED Component are deleted when no other records are linked to it. Otherwise if the record from the RELATED Component is deleted first, then all records from THIS Component are deleted.
|
Many-to-One
|
On the component where the relationship has been created
|
1
|
Many
|
No
|
No
|
One-to-Many
|
No records are deleted.
|
One-to-Many
|
On the related component. (Associative)
|
1
|
Many
|
No
|
Yes
|
One-to-Many
|
Records from RELATED Component are deleted when the record from the THIS Component is deleted.
|
One-to-many;
Contained by Primary
|
On the related component. (Associative)
|
1
|
Many
|
Yes
|
No
|
One-to-Many
|
Records from THIS Component are deleted when the record from the RELATED Component is deleted and no other records are linked to THIS record.
|
One-to-many;
Contained by Associative
|
On the related component. (Associative)
|
1
|
Many
|
Yes
|
Yes
|
One-to-Many
|
This depends on which record is deleted first. If the record from RELATED Component is deleted first then the records from the THIS Component are deleted when no other records are linked to it. If the record from the THIS Component is deleted first; then all records from RELATED Component are deleted.
|
One-to-many
|
On the related component. (Associative)
|
Many
|
Many
|
No
|
No
|
Many-to-Many
|
No records are deleted
|
Many-to-many; Referenced
|
Not stored in the components.
Uses the table 'bms_component_links'
|
Many
|
Many
|
Yes
|
No
|
Many-to-Many
|
Records from THIS Component are deleted when the record from the RELATED Component is deleted and no other records are linked to THIS record.
|
Many-to-many;
Owned by Associative
|
Not stored in the components.
Uses the table 'bms_component_links'
|
Many
|
Many
|
No
|
Yes
|
Many-to-Many
|
Records from RELATED Component are deleted when the record from the THIS Component is deleted and no other records are linked to RELATED record.
|
Many-to-many;
Owned by Primary
|
Not stored in the components.
Uses the table 'bms_component_links'
|
Many
|
Many
|
Yes
|
Yes
|
Many-to-Many
|
Records from RELATED Component is deleted when all the records from the THIS Component is deleted and vice versa.
|
Many-to-many
|
Not stored in the components.
Uses the table 'bms_component_links'
|