ktaranov/sqlserver-kit

Database object naming convention

Deilan opened this issue · 2 comments

Regarding SQL Server Object Name Convention @ SQL Server Name Convention and T-SQL Programming Style:

SQL Server Object Name Convention

Object Code Notation Length Plural Prefix Suffix Abbreviation Char Mask Example
[Database] UPPERCASE 30 No No No Yes [A-z] MYDATABASE

Could you please explain where this particular database naming convention comes from? I've never seen database named in UPPERCASE notation, nor I've seen any conventions proposing to name databases in uppercase. The most common case I'm aware of is to name in snake_case (my_database in this example). Even the referenced article on database creation uses snake_case notation:

CREATE DATABASE database_name

It's just our choice, due to the convenience of reading large T SQL scripts - we want to see all changes and mentions of databases by capslock, it's convenient for us. You can use any notation in your team, the main thing is that everyone adheres to it.

Microsoft in its learning database recommended PascalCase notation.