Table: Custom_Grouping
Columns
Name | Type | Constraints | Description
custom_grouping_KEY | int | NOT NULL |
update__staff_KEY | int | NOT NULL |
update_date_utc | datetime | NOT NULL |
custom_field_KEY | int | NOT NULL | Key to a Custom Field.
custom_grouping_id | nvarchar (11) | NOT NULL | User defined identifier (unique).
description | nvarchar (250) | NOT NULL | User defined description.
create_date_utc | datetime | NOT NULL |
custom_grouping_id_sortable | varchar (48) | NOT NULL | A 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
Name | Columns | Description
PK_Custom_Grouping$custom_grouping_KEY | custom_grouping_KEY | CLUSTERED
Unique constraints
Name | Columns | Description
UK_Custom_Grouping$custom_field_KEY$custom_grouping_id | custom_field_KEY, custom_grouping_id |
UK_Custom_Grouping$custom_field_KEY$custom_grouping_id_sortable | custom_field_KEY, custom_grouping_id_sortable | An index by the sortable ID is desired, and the algorithm ends up producing unique values.

Foreign keys
Name | Columns | Referenced table | Description
FK_Custom_Grouping__Custom_Field__custom_field_KEY | custom_field_KEY | Custom_Field |