Table: dbo.tables_relations (Tables relations)

Schema dbo
Name tables_relations
Title Tables relations
Module Schema and Metadata

Holds foreign keys, either defined in DBMS or by user in Dataedo. The two types are distinguished by source column (DBMS/USER).

Columns
PK Name Data type Null Attributes Description
1 table_relation_id int Identity / Auto increment column Row ID.
Row ID.
Identity / Auto increment column
2 pk_table_id int Primary key table. Ref: tables.
Primary key table. Ref: tables.
3 fk_table_id int Foreign key table. Ref: tables.
Foreign key table. Ref: tables.
4 source nvarchar(50) Default: 'USER' 'DBMS' for imported from DBMS, 'USER' for defined by user in repository only
'DBMS' for imported from DBMS, 'USER' for defined by user in repository only
Default: 'USER'
5 name nvarchar(250) Relation name from DBMS or assigned by user if relation is user defined.
Relation name from DBMS or assigned by user if relation is user defined.
6 description nvarchar(MAX) Relation description defined with Dataedo.
Relation description defined with Dataedo.
7 status char(1) Default: 'A' 'D' if relation was deleted from DBMS, 'A' otherwise.
'D' if relation was deleted from DBMS, 'A' otherwise.
Default: 'A'
8 creation_date datetime Default: getdate() Standard row creation timestamp.
Standard row creation timestamp.
Default: getdate()
9 created_by nvarchar(100) Default: user_name() Database/Dataedo username that created row.
Database/Dataedo username that created row.
Default: user_name()
10 last_modification_date datetime Default: getdate() Standard row last update timestamp.
Standard row last update timestamp.
Default: getdate()
11 modified_by nvarchar(100) Default: user_name() Database/Dataedo username that last updated row.
Database/Dataedo username that last updated row.
Default: user_name()
12 update_rule nvarchar(100) Update rule as defined in DBMS: NO ACTION, SET NULL, CASCADE
Update rule as defined in DBMS: NO ACTION, SET NULL, CASCADE
13 delete_rule nvarchar(100) Update rule as defined in DBMS: NO ACTION, SET NULL, CASCADE
Update rule as defined in DBMS: NO ACTION, SET NULL, CASCADE
14 disabled bit 1 when imported key is disabled (only DBMS).
1 when imported key is disabled (only DBMS).
15 title nvarchar(250)
Relations
Foreign table Primary table Join Title / Name / Description
dbo.tables_relations dbo.tables dbo.tables_relations.fk_table_id = dbo.tables.table_id Foreign table
FK_tables_relations_table_fk
dbo.tables_relations.fk_table_id = dbo.tables.table_id
Foreign table
FK_tables_relations_table_fk
dbo.tables_relations dbo.tables dbo.tables_relations.pk_table_id = dbo.tables.table_id Primary table
FK_tables_relations_table_pk
dbo.tables_relations.pk_table_id = dbo.tables.table_id
Primary table
FK_tables_relations_table_pk
dbo.erd_links dbo.tables_relations dbo.erd_links.relation_id = dbo.tables_relations.table_relation_id FK_erd_links_tables_relations
dbo.erd_links.relation_id = dbo.tables_relations.table_relation_id
FK_erd_links_tables_relations
dbo.tables_relations_columns dbo.tables_relations dbo.tables_relations_columns.table_relation_id = dbo.tables_relations.table_relation_id FK_tables_relations_columns_relation
dbo.tables_relations_columns.table_relation_id = dbo.tables_relations.table_relation_id
FK_tables_relations_columns_relation
Unique keys
Key name Columns Description
PK_tables_relations table_relation_id Table primary key.
Table primary key.
Triggers
Key name When Description
trg_tables_relations_Modify After Insert, Update Standard insert/update trigger setting last_modification_date, modified by columns
Standard insert/update trigger setting last_modification_date, modified by columns
Uses
Name
dbo.tables_relations (Tables relations)
Used by
Name
dbo.tables_relations (Tables relations)
Exported: 2017-05-15 08:09, Last imported: 2017-04-06 15:30