Naming Conventions

These are naming and abbreviation conventions for tables, fields, and other objects used by the 向日葵视频BI team.

Cases

  1. Databases, schemas, tables and fields should all be in lower case (table1.field1).
  2. Parameters and variables should be in camel case (myVariables, myParameter).

Underscores

  1. Tables and fields should have descriptive names with words separated by underscores: f_student_details, d_term_dates.

Prefixes and suffixes

  1. Fact tables should begin with the prefix "f_"
  2. Dimension tables should begin with the prefix "d_"
  3. Summary tables should begin with the prefix "s_"
  4. Calculated measure tables should begin with the prefix "m_"

Abbreviation standards for other common words:

WORD ABRV
career car
category cat
code code
completion compl
course crse
description desc
date dt
enroll enrl
indicator ind
number nbr
percent pct
primary pri
program prog
status stat

Flags and Indicators

In most every case the suffix "ind" should be used for indicator or flag type fields. In general, the value for these fields should by Y or N as the indicator. In some cases where there will be lots of look ups or sums, 0/1 can be used in place of the characters Y/N.