Cheatography
https://cheatography.com
Naming Conventions for Data Objects
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Entitty
From Entity Description |
Meaningful to user. |
Reflects business data domain. |
Noun or noun phrase. |
Don't use Organization name. |
Pascal case with a space between words. |
DEPLOYMENT EVENT, PERSON CATEGORY |
No Numbers. |
Limit abbreviations and acronyms |
“EMPLOYEE”, NOT “EMPLOYEES”. |
Database
“MISO_” + System Acronym |
Request to ITSO for new DB |
MISO_BFMS, MISO_PBMS.., ETC.
Table
Entity names without spaces. |
Do not prefix with ‘tbl’. |
Do not use underscores except to indicate the association table (resolve many to many relationship). |
ENTITY DEPLOYMENT EVENT BECOMES TABLE DEPLOYMENTEVENT
“CUSTOMER” TABLE AND “PRODUCT” TABLE HAS MANY TO MANY RELATIONSHIP. THE ASSOCIATION TABLE MAY BE NAMED AS “CUSTOMER_PRODUCT” TO INDICATE THE TABLE IS AN ASSOCIATION TABLE.
|
|
Attribute
Must be unique within an entity. |
Be descriptive and meaningful. |
Don’t use the DoD class word as the suffix in the name. |
Use Pascal case and leave a space between the words |
Limit abbreviations and acronyms. If used they are ALL CAPS. |
If foreign key Then attribute name = same as it appears in the parent. |
Verify parent/child relationships are correct. |
“PERSON” ENTITY MAY HAVE A CHILD “FEDERAL EMPLOYEE” ENTITY. PERSON IDENTIFIER FROM PARENT ENTITY IS THE FOREIGN KEY IN CHILD ENTITY. A FEDERAL EMPLOYEE MAY HAVE A SUPERVISOR AND A TIME CLERK PERSON. THEREFORE, “PERSON” ENTITY HAS 2 RELATIONSHIPS WITH “FEDERAL EMPLOYEE” ENTITY. THE FOREIGN KEY NAME SHOULD BE NAMED TO REFLECT THE CORRESPONDING ROLE. AS AN EXAMPLE, ONE MAY BE NAMED AS “SUPERVISOR PERSON IDENTIFIER” AND ANOTHER MAY BE “TIME CLERK PERSON IDENTIFIER”. |
|
|
Column
Attribute name without spaces. |
Don't prefix with "col" or underscore. |
Don't use reserved SQL keywords. |
Primary Key should be surrogate key |
FOR “DEPLOYMENTEVENT” TABLE, THE SURROGATE PRIMARY KAY MAY BE NAMED AS “DEPENDENTEVENTID” |
Don't add audit columns. |
INSERTUSERID, INSERTDATETIME, UPDATEUSERID, UPDATEDATETIME, TIMESTAMP AND ROWVERSION |
|