Tuesday, May 31, 2011

Naming Conventions.

New Developers come to me often and say "Pinal Steve, what is the BEST way to name all of my objects?". Today I will outline all of the best ways.

Stored Procedures:
You want something that lets you KNOW it's a stored-procedure. So ALWAYS use "sp_" to preface your stored procs! And don't worry about the name being descriptive--just name the proc any old thang. For example, if you needed a stored proc to update a table and then return a value of Success of Not Successful, just name it something like "sp_doStuffToData". People will know what you mean right away.

Tables:
Tables should always use have the TBL_ preface in front of them, just in case there's ANY question when you are looking in Enterprise Manager or Toad. At no times should you EVER use SQL Server Management Studio. It is actually a VIRUS and will harm your computer.

Stay tuned for more updates and you'll thank me later!

No comments:

Post a Comment