Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server schema naming convention

Are there any industry standard naming conventions for naming schemas in SQL Server?

Unfortunately a few reserved words such as admin describe my planned schemas the most clearly. To get around this I have been debating on making the schema names plural, but in a way that doesn't make sense, and will cause an issue with the Products.Products schema and table.

So I was wondering if there was any clear convention that Microsoft or the industry uses?

like image 915
Elias Avatar asked May 22 '17 20:05

Elias


People also ask

What should I name my schema?

Use Simple, Descriptive Column Names Avoid short and cryptic names like pkg_fk; others won't know what that means. Descriptive names make it easier for others to understand the schema, which is vital to maintaining efficiency as the team grows. Don't use ambiguous names for polymorphic data.

What are the naming conventions in SQL?

Though these vary somewhat between SQL “flavors”, SQL columns and table names should begin with a letter, not end in an underscore, and should contain only alphanumeric characters. Column and table names should not contain spaces.

What is schema name in SQL Server?

A Schema in SQL is a collection of database objects associated with a database. The username of a database is called a Schema owner (owner of logically grouped structures of data). Schema always belong to a single database whereas a database can have single or multiple schemas.

What is the default schema name in SQL Server?

The dbo schema is the default schema of every database. By default, users created with the CREATE USER Transact-SQL command have dbo as their default schema. The dbo schema is owned by the dbo user account.


1 Answers

I found this reference for SQL Server Name Conventions

SQL Server Name Convention and T-SQL Programming Style

It says to use lowercase and no plurals in schemas

enter image description here

like image 101
santiaago Avatar answered Sep 21 '22 22:09

santiaago