Typical one-to-many relationship structure
In the absence of time-dependent relationships, the typical database structure is to use a parent/child table structure to represent a one-to-many relationship. The following diagram illustrates that one customer can have many accounts.
Customer-to-account example:
In this example, the customer YourCustomer LLP has three accounts: 1000101, 1000201, and 1000301. The following Customer table and Account table represent the relationship between one customer and many accounts.
Customer table
|
Customer ID |
Company name |
|---|---|
|
100 |
YourCustomer LLP |
Account table
|
Account ID |
Customer ID |
NAICS code |
|---|---|---|
|
200 |
100 |
1000101 |
|
300 |
100 |
1000201 |
|
400 |
100 |
1000301 |
Note: Actual Customer and Account tables contain more elements than shown in the examples.
The typical one-to-many relationship described-above, does not exist for time-dependent relationships. It uses a unique NodeKey value to define relationships between configuration nodes in the database. The following section describes and illustrates such relationships in the database.