Table: dbo.Client_N_Subsidiary_Client
This table will hold all the master client and their subsidiary client linked to them
Columns
Name | Type | Constraints | Description
client_n_subsidiary_client_KEY | int (4) | NOT NULL | Primary key for this table.
consolidating__client_KEY | int (4) | NOT NULL | key to the Consolidating(master) client and foreign key to parent Client table
subsidiary__client_KEY | int (4) | NOT NULL | Key to the subsidiary client and foreign key to parent Client table
sequence_number | int (4) | NOT NULL | subsidiary order
subsidiary_client_collection_type_KEY | int (4) | NOT NULL | The Client_N_Subsidiary_Client table can maintain two collections of subsidiary clients for each master client. This column distinguishs these two collections. See the description for table Subsidiary_Client_Collection_Type for an explanation of these two collection types.
subsidiary_is_dirty | bit (1) | NOT NULL | This flag will be set when the subsidiary client is dirty. This flag will only be set for the subsidiary client which is currently included in the master client.

Primary key
Name | Columns | Description
PK_Client_N_Subsidiary_Client | client_n_subsidiary_client_KEY |
Unique constraints
Name | Columns | Description
UK_Client_N_Subsidiary_Client$consolidating__client_KEY$subsidiary__client_KEY$subsidiary_client_collection_type_KEY | consolidating__client_KEY, subsidiary__client_KEY, subsidiary_client_collection_type_KEY |

Foreign keys
Name | Columns | Referenced table | Description
FK_Client_N_Subsidiary_Client__Client__consolidating__client_KEY | consolidating__client_KEY | Client (client_KEY) |
FK_Client_N_Subsidiary_Client__Client__subsidiary__client_KEY | subsidiary__client_KEY | Client (client_KEY) |
FK_Client_N_Subsidiary_Client__Subsidiary_Client_Collection_Type__subsidiary_client_collection_type_KEY | subsidiary_client_collection_type_KEY | Subsidiary_Client_Collection_Type (subsidiary_client_collection_type_KEY) |