General - Do you know object name should follow your company Naming Conventions?
19/03/2020 11:03 AM by
- SQL Server Object Naming Standard SSW's Standard for naming SQL Server Objects.
- SQL Server Stored Procedure Naming Standard SSW's Standard for naming Stored Procedures.
- SQL Server Indexes Naming Standard SSW's Standard for naming Indexes.
- SQL Server Relationship Naming Standard SSW's Standard for naming Relationships
- Use decreasing generality for table names ie. Client and ClientInvoice, then ClientInvoiceDetail.
- Don't use underscores, instead use upper and lower case ie. ClientInvoice is preferred over Client_Invoice.
- Table names should use pluralisation ie. Clients is preferred over Client.
- Generally, do not use abbreviations. But there are a few words that are so commonly used that they can be abbreviated. These are:
Prefix all Date fields with 'Date' ie. DateInvoiced. One extra use of this is you can have generic code that enables a Date control on this field.Suffix Percent fields with 'Pct' ie. SalesTaxPct.
- Quantity = Qty
- Amount = Amt
- Password = Pwd
Only use alphabet characters. ie. don't use AustraliaListA$. Avoid the following characters in your object names in SQL Server. If you do not do this, you will need to constantly identify those ill-named objects with bracketed or quoted identifiers - otherwise, unintended bugs can arise.Don't use reserved words on their own. ie. User, Count, Group, etc. They can be used if joined with other words. Reserved Keywords (Transact-SQL)
Do you feel this rule needs an update?