Skip to main content
Skip table of contents

<database>.DBForeignKeys

This file defines foreign key columns in the textual database. If there are no foreign keys then this file can be left empty, but the file must exist even if it is empty in order for this to be considered a valid TDD.

Each line in the file contains a comma separated list of values that define a single foreign key. A colon is used to separate the foreign key and the column it refers to:

TEXT
<table_name>, <column_name> : <foreign_table_name>, <foreign_column_name>

The values are as follows:

EntryDescription
<table_name>
The name of the table that contains the foreign key.
<column_name>
The name of the column that contains the foreign key.
<foreign_table_name>
The table that the foreign key refers to.
<foreign_column_name>

The column in the foreign table that is reference by the foreign key.

For example:

Household.DBForeignKeys

TEXT
Houses,Occupancy:Occupancy,code
Cars,Car Make:Car Make,code
Cars,Car Wheel Size:Car Wheel Size,code
Rooms,Num Beds:Num Beds,code
Houses,Heating:Heating,code 

In this example, the first line specifies that the Occupancy column in the Houses table is a foreign key reference to the code column in the Occupancy table.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.