4. Global Naming Convention
• UPPERCASE / lowercase / camelCase /
PascalCamelCase
• Separate with underscore (order_detail)
• Singular / Plural (company not companys)
• Same term for same meaning
• Prefix & Postfix
• Do not use number (1st ,type_4_address,user_2_role)
• Comment
5. Table
• Relationship
◆user_role , user has many role
◆employee_address , employee has an address
• PK
◆Use id in all table / {table}_id
◆Avoid composite key
• Use Same Term (account / accounting / accounts)
6. Column
• Same term !!!
◆status,state,code,info,version,checkd ...
◆created_at,updated_at,deleted_at
◆created_user_id,upXXX...,deleXXX...
◆type,category,classification,kind ...
• FK
◆{ref_id} -> user ref company , use company_id