Synergetic database object naming conventions

Modified on Fri, 13 Mar at 12:48 AM

Clients can create database object with a 'u' prefix.

While the use of the naming conventions is recommended we do not (cannot) mandate this for user objects.

Schemas

SchemaDescription
dbo

contains the non-financial records for the school including community records for all types of people and companies (names, addresses, phone numbers etc.), applications, student, alumni, academic information, etc.

finance

contains the core financial transaction records for the school. Separating these into a separate schema allows for different security permissions to easily be granted at the database level and it also allowed for schools to have different finance schemas for the different financial entities they operate, while sharing the one set of community information.

media

the repository for multimedia information. This includes school photos, archived school reports and debtor statements as well as any digital document stored against a record. Having this as a separate schema allows for different growth and backup strategies.

sifsql objects to support the Synergetic specific SIF functionality
siformsql objects to support the SIF Environment provider. These objects are defined by the ORM used in the SIF Object Provider (C#) and should only be changed in conjunction with changes to the Object Provider.
xsyscontains objects to support interfaces to external systems/entities. This includes code sets used by the external systems and the mappings back to their equivalent Synergetic values.
eventbrokersql objects to support the Event Broker functionality - a notification component for (a)synchronous loosely coupled event handling.
preserved

used as a permanent archive of data when the underlying database structure changes. In the current schema, this information is combined with temporary changed data in the scratch schema. This separates the data that currently goes in to the scratch schema from that which should be stored permanently for historical verification, from data which is a temporary backup and can be cleared after an upgrade.

scratch

a temporary repository for backups of table data during table changes (usually during an upgrade)

Stored Procs

PrefixDescription
sp

legacy/older items that didn't have the convention used eg spStudentsSet (note the 'Set' implies a select dataset purpose)

crspCrystal Report stored procedure
Lookuplu table/used for lu dropdowns
spccreate (not used much)
spddelete
speexternal/export
spggenerate
spiinsert
spq

queue (service broker related)

spsselect
spttransfer
spuupdate
spxexternal/relating to interfaces outside Synergetic

Views

There are some exceptions where tables have been abstracted as views, with the table being renamed with a 't' prefix.

For example, the Config table was recently refactored as a view against a tConfig table.

 

PrefixDescription
pv

program view (used by our applications internally and specific to their needs)

vview

Tables

PrefixDescription
lulookup table
ref

ref table (stores internal system data like SynergyMeanings and external code sets)

ttable (used when we changed some areas to have user-based security, and a view replaced the original 'non-t' table name eg GeneralLedger)
wkwork table (used as temp staging area for some program logic and transactions)
xeexternal export
xiexternal import
xfre

transfer external (web service outbound)

xfritransfer internal (web service inbound)

Indices

prefixDescription
PK_<ReferencedTableName>Primary Key
AK_<ReferencedTableName>_<Column Name,,>

Covering index

Triggers

Triggers are referenced by a suffix rather than a prefix, with action on INSERT, UPDATE and DELETE referenced in that seniority

 

SuffixDescription
_ITRafter INSERT
_UTRafter UPDATE
_DTRafter DELETE
_IUTRafter INSERT or UPDATE
_IUDTRafter INSERT, UPDATE or DELETE
_IDTR

after INSERT or DELETE (rarely used)

_UDTR

after UPDATE or DELETE (rarely used)

_IO_ITRinstead of INSERT
_IO_UTRinstead of UPDATE
_IO_DTRinstead of DELETE
_IO_IUTRinstead of INSERT or UPDDATE
_IO_IUDTRinstead of INSERT, UPDATE or DELETE
_IO_IDTRinstead of INSERT or DELETE (rarely used)
_IO_UDTRinstead of UPDATE or DELETE (rarely used)
_DDLTRddl trigger (rarely used)

Constraints

Constraints are formatted as follows (prefix format follows SSMS studio templating - eg: you can Ctrl + Shift + M in SSMS)

PrefixDescription
DF_<Tablename>_<FieldName>

Default constraint

CK_<Table Name>_<Column Name,,>Check constraint
FK_<ForeignTableName>_<ReferencedTableName>

Foreign Key - usually i only add foreign column as needed - eg: when referenced table name is referenced more than once by Foreign Table (in the case of ModifiedByID, CreatedByID - both are referencing Community)

Functions

PrefixDescription
fn

Function


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article