Buenas Practicas En Ms Sql
http://www.sql-server-performance.com/2001/sql-best-practices/
SQL Server TSQL Coding Conventions, Best Practices, and Programming Guidelines
By Vyas Kondreddi
Databases are theheart and soul of many enterprise applications, and it is very essential to pay special attention to database programming. I’ve seen in many occasions where database programming is overlooked, thinkingthat it’s something easy that be done by anyone. This is wrong.
For a better performing database you need a real DBA and a specialist database programmer, let it be for Microsoft SQL Server, Oracle,Sybase, DB2 or whatever! If you don’t use database specialists during your development cycle, databases often end up becoming the performance bottleneck. I decided to write this article in order toput together some of the database programming best practices so that my fellow DBAs and database developers can benefit!
Here are some programming guidelines and best practices, keeping quality,performance and maintainability in mind. This list many not be complete at this moment, and will be constantly updated. BTW, special thanks to Tibor Karaszi (SQL Server MVP) and Linda (lindawie) fortaking time to read this article and providing suggestions.
Decide upon a database naming convention, standardize it across your organization, and be consistent in following it. It helps make yourcode more readable and understandable. Click here to see the database object naming convention that I follow.
Make sure you normalize your data at least to the 3rd normal form. At the sametime, do not compromise on query performance. A little bit of denormalization helps queries perform faster.
Write comments in your stored procedures, triggers and SQL batches generously, wheneversomething is not very obvious. This helps other programmers understand your code clearly. Don’t worry about the length of the comments, as it won’t impact the performance, unlike interpreted...
Regístrate para leer el documento completo.