Home > Database > Mysql Tutorial > What are the Best Practices for Naming MSSQL Databases, as Exemplified by AdventureWorks?

What are the Best Practices for Naming MSSQL Databases, as Exemplified by AdventureWorks?

DDD
Release: 2024-12-17 03:11:25
Original
757 people have browsed it

What are the Best Practices for Naming MSSQL Databases, as Exemplified by AdventureWorks?

Navigating Microsoft's MSSQL Database Naming Conventions

While Microsoft's MSDN provides general naming guidelines, are there specific conventions for naming MSSQL databases?

Adopting Best Practices from AdventureWorks

Microsoft's AdventureWorks database serves as an exemplary guide for database naming practices. It embodies the following principles:

  • Understandable Object Names:
  • Non-Pluralized Table Names: (e.g., "User" instead of "Users")
  • Limited Abbreviations: (e.g., Qty, Amt)
  • Exclusive PascalCase: (except for specific column names like "rowguid")
  • Absence of Underscores
  • Permitted Keywords: (e.g., Name)
  • Prefixed Stored Procedures: ("usp")
  • Prefixed Functions: ("ufn")

Refer to the following resources for further guidance:

  • [AdventureWorks Data Dictionary](https://docs.microsoft.com/en-us/sql/relational-databases/system-information-schema-views/sys-objects-system-view-transact-sql)
  • [Stored Procedures in AdventureWorks](https://docs.microsoft.com/en-us/sql/database-engine/develop-database/stored-procedures)
  • [Functions in AdventureWorks](https://docs.microsoft.com/en-us/sql/database-engine/develop-database/functions)

Caution: Naming Controversies

It's important to note that database naming conventions can evoke strong opinions, with developers often having entrenched preferences. For instance, debates often arise over whether a table should be named "OrderHeader" or "OrderHeaders."

The above is the detailed content of What are the Best Practices for Naming MSSQL Databases, as Exemplified by AdventureWorks?. 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