Table: dbo.Office
Columns
NameTypeConstraintsDescription
office_KEYint (4)NOT NULLDatabase assigned primary key for this table.
office_idnvarchar (22)NOT NULLUser defined identifier (unique).
descriptionnvarchar (60)NOT NULLUser defined description.
contact_KEYint (4)NOT NULLKey to the primary Contact record for this Client.
office_id_sortablevarchar (48)NOT NULLA representation of the office_id column that sorts in natural order, meaning that digits are sorted as numbers while non-digits are sorted alphabetically. A trigger keeps this field synchronized with the content of office_id.
Primary key
NameColumnsDescription
PK_Officeoffice_KEY
Unique constraints
NameColumnsDescription
UK_Office$contact_KEYcontact_KEY
UK_Office$office_idoffice_id
UK_Office$office_id_sortableoffice_id_sortable
Foreign keys
NameColumnsReferenced tableDescription
FK_Office__Contact__contact_KEYcontact_KEYContact (contact_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Staff__Office__office_KEYoffice_KEYStaff
FK_Firm__Office__office_KEYoffice_KEYFirm

Schema diagram