Relation Types and Behavior

SAI360 supports three relationship types:

One-to-One

In a one-to-one relationship, a record in Component A can have no more than one matching record in Component B, and vice versa.

One-to-Many (or Many-to-One)

A one-to-many relationship is the most common type of relationship. In this type of relationship, a record in Component A can have many matching records in Component B, but a record in Component B can have only one matching record in Component A.

Many-to-Many

In a many-to-many relationship, a record in Component A can have many matching records in Component B, and vice versa.

In order to determine the type and behavior of the relationships, the following questions are available when defining a relationship.

Q1

One [THIS component] record can have how many [RELATED component] records?

1/Many

Q2

One [RELATED component] record can have how many [THIS component] records?

1/Many

Q3

Delete [THIS component] record(s) when [RELATED component] record(s) are deleted?

Yes/No

Q4

Delete [RELATED component] records(s) when [THIS component] record(s) are deleted?

Yes/No

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'

See Also

Component Relationships

Add a Component Relationship

Edit Component Relationships

Add a Component Rollup Relationship