SQL Server Constraints
We understand that many professionals want to have a naming convention enforced when
upsizing objects to SQL Server, and that they probably want to use their own convention.
MUST has two built in templates for naming conventions, and uses a meta-tag language to define the
naming constraints so you can change the default settings to match your own needs using our symbolic tokens.
SQL Server has a maximum constraint name length of 128 characters, and once you have
established your naming convention we will enforce the convention subject to
the uniqueness of the constraint name. MUST will succeed in most situations
in generating additional uniqueness if your naming convention fails by adding
a numerical suffix to any constraint that fails.
Changing Naming Convention Setting
Use the “Options and Settings Ribbon” – “Preferences” - “Naming Conventions” tab to change
these settings.
We offer four built in variations based around two templates. The two variations on the
templates offer the option to add schema names to the convention.
Once you have selected a template, you can edit any of the constraint setting subject to
rules we have added to minimise conflicts and errors.
We decided to group these naming rules around three groups of objects.
Special field naming conventions
MUST has a naming convention for timestamps and our optional auditing fields. Below we show one example :-
Constraint naming conventions
This covers the most popular constraints that you may want to name in SQL Server.
Trigger naming conventions
Where triggers are generated we offer the following options.
Tokens
Constraints are typed in using a combination of free text such as pk or PK for the primary key,
and tokens or tags such as <table> for the table name or <field> for a field name.