ConstraintDefinition

<< Click to Display Table of Contents >>

Navigation:  Development > Project Artifacts >

ConstraintDefinition

 

ConstraintDefinitions model the details of table constraints defined in a data source.

Information-icon_16px Only Primary Key and Foreign Key constraints are stored as ConstraintDefinitions.

 

Information-icon_16px ConstraintDefinitions only exist for collection resources in relational databases.

 

Information-icon_16px Non-SQL datasources may be assigned ConstraintDefinitions with slightly different interpretations. The table below shows the interpretation for Smallworld in the Note column.

 

{

 "constraintName" : "",

 "constraintType" : "",

 "tableName" : "",

 "columnNames" : [],

 "referencedTableName" : "",

 "referencedColumnNames" : []

}

 

Attribute

Value

Note

constraintName

The name of the constraint

For Smallworld, this is a generated PK name or the name of a join field

constraintType

The type of constraint ("DTS_PRIMARY_KEY" or "DTS_FOREIGN_KEY")

 

tableName

The name of the collection/table the constraint is defined on

For Smallworld, the collection with the join field being modeled, or the intermediate table that governs the join

columnNames

The list of columns the constraint is defined on

For Smallworld, the list of underlying physical fields on the tableName side of the join

referencedTableName

The table that the constraint references

For Smallworld, the collection on the opposite side of the join

referencedColumnNames

The list of columns that are referenced by the constraint (the order corresponds to that of columnNames)

For Smallworld, the list of underlying physical fields on the referencedTableName side of the join