Table: Custom_Grouping
Columns
NameTypeConstraintsDescription
custom_grouping_KEYintNOT NULL
update__staff_KEYintNOT NULL
update_date_utcdatetimeNOT NULL
custom_field_KEYintNOT NULLKey to a Custom Field.
custom_grouping_idnvarchar (11)NOT NULLUser defined identifier (unique).
descriptionnvarchar (250)NOT NULLUser defined description.
create_date_utcdatetimeNOT NULL
custom_grouping_id_sortablevarchar (48)NOT NULLA representation of the custom_grouping_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 custom_grouping_id.
Primary key
NameColumnsDescription
PK_Custom_Grouping$custom_grouping_KEYcustom_grouping_KEYCLUSTERED
Unique constraints
NameColumnsDescription
UK_Custom_Grouping$custom_field_KEY$custom_grouping_idcustom_field_KEY, custom_grouping_id
UK_Custom_Grouping$custom_field_KEY$custom_grouping_id_sortablecustom_field_KEY, custom_grouping_id_sortableAn index by the sortable ID is desired, and the algorithm ends up producing unique values.
Foreign keys
NameColumnsReferenced tableDescription
FK_Custom_Grouping__Custom_Field__custom_field_KEYcustom_field_KEYCustom_Field

Schema diagram