relations Table (52)
Some tooltip text!
• 3 minutes to read
• 3 minutes to read
Instance of a relation, in principle between any two records, as long as they are defined in RelationDefinition. All instances of relations are held in this table; their definitions are in the RelDef table (RelDef + RelTarg define which relations you can have, this table contains the relations the user has actually entered). From 6.1 all links between appointments, sales and documents are also stored in this tabel.
Fields
Name | Description | Type | Null |
---|---|---|---|
relation_id | Primary key | PK | |
reldef_id | Reference to definition | FK relationdefinition | |
source_table | Actual source table | TableNumber | |
source_record | Actual source record | RecordId | |
destination_table | Actual target table | TableNumber | |
destination_record | Actual target record | RecordId | |
relcomment | Comment for relation | String(254) | ● |
reversed | Is direction reversed relative to definition | UShort | ● |
group_idx | User group owning this relation | FK UserGroup | ● |
startDate | Start date of validity | DateTime | ● |
endDate | End date of validity | DateTime | ● |
relFlags | Relation flags, meaning as yet unspecified | UInt | ● |
registered | Registered when | UtcDateTime | |
registered_associate_id | Registered by whom | FK associate | |
updated | Last updated when | UtcDateTime | |
updated_associate_id | Last updated by whom | FK associate | |
updatedCount | Number of updates made to this record | UShort | |
associateId | Owner of this relation record | FK associate |
Indexes
Fields | Types | Description |
---|---|---|
relation_id | PK | Clustered, Unique |
reldef_id | FK | Index |
source_table | TableNumber | Index |
source_record | RecordId | Index |
destination_table | TableNumber | Index |
destination_record | RecordId | Index |
reversed | UShort | Index |
source_table, source_record, reversed | TableNumber, RecordId, UShort | Index |
destination_table, destination_record, reversed | TableNumber, RecordId, UShort | Index |
Relationships
Table | Description |
---|---|
associate | Employees, resources and other users - except for External persons |
relationdefinition | Definition of a relation. This table defines the relations that can exist in the database. Each relation has an active text and a passive text. The table RelationTarget specifies which pairs of tables this relation can connect. Use of the active and passive texts is dependent on which direction the relation is viewed in, e.g., active text = "Owns" and passive text = "Is owned by". |
UserGroup | Secondary user groups |
Replication Flags
- Area Management controlled table. Contents replicated to satellites and traveller databases.
- Replicate changes UP from satellites and travellers back to central.
- Copy to satellite and travel prototypes.
Security Flags
- Sentry controls access to items in this table using user's Role and data rights matrix.