Database Object Naming Standard

All database object names are in lowercase and singular.

The Prefix

All NEON database object names start with the letters ‘ng’.

This is to enable NEON to be installed in an existing customer database or together with other systems, with minimal risk of name clashes with other tables etc.

  • All permanent database objects created during installation are prefixed with ng_.
  • All database objects created on the fly as a result of Entity configurations are prefixed with ‘ng’ followed by one or two letters describing what type of configuration it is, followed by underscore. For example CodeBank tables start with ‘ngcb_’.

The Postfix

All database objects have a postfix linked to the type of object:

  • _tb = table. For example ng_member_tb
  • _v = view. For example ng_entity_v. Views are normally used to de-normalise results, but may also be used as a layer between the APIs and the underlying database structure to simplify backward compatibility.
  • _sp = stored procedure. Note, stored functions don’t have a postfix.
  • _fk = foreign key constraint. They are named based on their table followed by the column(s), for example ng_order_memberid_fk (the member_id column in the ng_order_tb table)
  • _ck = check constraints. They are named based on their table followed by the column(s), for example ng_entity_type_ck (the type column in the ng_entity_tb table)

Table indexes are only unique within a table and are named by the column(s) followed by _ix (non-unique) or _ux (unique), for example entityid_ix. Primary key indexes are called PRIMARY. The index names are not normally important, unless optimizing execution plans for queries running against large tables.