8 Simple Rules For Dating My Database


Today.. Polite SQL Server manners..
 
1. Use a consistent naming convention
    Pretty obvious rule, this one..  Best to try and stick to a common SQL syntax too…
 
2. Indexes: use them
    Why, oh why does it take so long to query 100,000 rows?
 
3. Keep the place tidy: remove unused Stored Procs
    Unless you like piling the kitchen sink high with dirty dishes, remove old procs when you’re done.
 
4. Roles: Use them
    ‘Nuff said
 
5. If I find "SELECT * FROM.." I’ll kill you
    OK, there are some times where you have to use this (maybe) but there is no excuse for being lazy
 
6. OUTER JOIN: Learn how to use it instead of subqueries
    Subqueries are performance hogs.. learn SQL and how an outer join or cartesian join works
 
7. Implement proper security!
    Seriously, do you leave your ATM card and PIN lying around.. together??  Why do everything via sa with no password?
 
8. Always follow the rules
    These rules will keep you safe and productive.  Respect others who need to use (and understand what you’re doing).
    Also, have some consideration for the humble sods who have to maintain and backup databases.
 
There are a bunch of other things, but they’re more ‘guidelines’.. Maybe for another rainy day..
Tell me what you think….

About Rob Sanders

IT Professional and TOGAF 9 certified architect with nearly two decades of industry experience, 18 years in commercial software development and 11 years in IT consulting. Check out the "About Rob" page for more information.

Leave a comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>