Home > Database > Mysql Tutorial > What are Microsoft SQL Server Database Naming Conventions?

What are Microsoft SQL Server Database Naming Conventions?

DDD
Release: 2024-12-28 14:59:16
Original
773 people have browsed it

What are Microsoft SQL Server Database Naming Conventions?

Microsoft SQL Database Naming Conventions

You mentioned finding Microsoft's Naming Guidelines from MSDN, but wondered if there were specific guidelines for Microsoft SQL Server (MSSQL) databases.

The AdventureWorks database included with SQL Server provides practical guidance for database naming best practices:

Naming Conventions:

  • Readable Object Names: Names should be straightforward and easily understandable.
  • Singular Table Names: Table names should not be pluralized (e.g., "User" instead of "Users").
  • Limited Abbreviations: Abbreviations can be used sparingly (e.g., "Qty," "Amt," etc.).
  • PascalCase: PascalCase is used for all objects, except for certain column names (e.g., "rowguid").
  • No Underscores: Underscores are not used.
  • Allowed Keywords: Certain keywords are allowed for table names (e.g., "Name").
  • StoredProcedure Prefixes: Stored procedures are prefixed with "usp."
  • Function Prefixes: Functions are prefixed with "ufn."

Additional Details:

  • [AdventureWorks Data Dictionary](link)
  • [Stored Procedures in AdventureWorks](link)
  • [Functions in AdventureWorks](link)

Cautionary Note: Database naming conventions can be subjective, and different developers have their preferences. Be prepared for potential discussions or debates when selecting naming conventions.

The above is the detailed content of What are Microsoft SQL Server Database Naming Conventions?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template