These are naming and abbreviation conventions for tables, fields, and other objects used by the 向日葵视频BI team.
Cases
- Databases, schemas, tables and fields should all be in lower case (table1.field1).
- Parameters and variables should be in camel case (myVariables, myParameter).
Underscores
- Tables and fields should have descriptive names with words separated by underscores: f_student_details, d_term_dates.
Prefixes and suffixes
- Fact tables should begin with the prefix "f_"
- Dimension tables should begin with the prefix "d_"
- Summary tables should begin with the prefix "s_"
- 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.