Tags:
create new tag
, view all tags

DB Naming Style

General Rules

  • The most important information should be on the left side, the least important on the right.
  • No mixing of upper- and lowercase, as many databases work only in uppercase.
  • Use underscores to_separate_words_and_enhance_legibility.
  • Avoid Prefixes. Use Suffixes.

Views Naming Scheme

  • Do not use prefixes like 'V_' as in 'V_VIEW_NAME'
  • Because Views can be treated exactly as tables, sometimes even for insert/delete/update operations, there is no need to distinguish them from tables. So don't use pre- or suffixes.

Examples

PERSON_DETAIL
NGROUP_MEMBER_DETAIL

Indexes and Constraint Naming Scheme


<TABLE NAME>_<COLUMN>_{PK|IDX|UNQ|FK}

Examples

PERSON_NPID_PK
UNAME_USERNAME_UNQ
GRANTED_SERVICE_NSID_IDX
UNAME_NPID_FK

Trigger Naming Scheme

<TABLE NAME>_{INS|UP|DEL}_{BEF|AFT}[_STMT]

Examples

SERVICE_INS_AFT
PERSON_UP_BEF

If the trigger is a statement-level trigger, it should be named like this:

DOZ_PERIODE_DEL_AFT_STMT

Topic revision: r1 - 2015-06-09 - vermeul
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback