HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 104867 thumbnail
User 201185 avatar

By xelipe
via juixe.com
Published: Aug 19 2008 / 09:23

Every production application I have been involved with has made use of a database. As a programmer, you don’t have to be a DBA, but just as with software development you need to adhere to a core set of database best practices.
  • 16
  • 3
  • 2281
  • 1

Comments

Add your comment
User 172732 avatar

Sergey Tyulkin replied ago:

0 votes Vote down Vote up Reply

Some of these are controversial:
* Do not use SELECT * in your queries, explicitly write the required columns names in the select statement.
I think if you follow the database design guidelines and thus do not have tables with 50+ columns (usually), then using * is not always a problem
* Avoid leaking your database design details, such as primary keys.
Usually you have to use your primary keys to identify entities, and so you have to put them on your pages. Of course, you can use ciphers, but do you really need to?

User 283269 avatar

vidalsasoon replied ago:

0 votes Vote down Vote up Reply

I think "*" is more of a databinding problem than a performance problem.

User 297793 avatar

amezick replied ago:

2 votes Vote down Vote up Reply

SELECT * is evil. Just add a new column to a database and code all over the place starts breaking even if you don't need that new column. Select * is a shortcut for when you are handwriting temporary queries and should never be used in code. You will understand once the batch job that processes your paycheck fails for 3 weeks while people hunt down this little bit of poop.

User 204573 avatar

Gene Gotimer replied ago:

0 votes Vote down Vote up Reply

Some of these are bad advice. Since no rationale is given for most of them, the article is of little value.

User 217374 avatar

senfo replied ago:

2 votes Vote down Vote up Reply

I'm nitpicking, but that was hard as crap to read. It would have been easier if a list (ordered or not; it doesn't matter) had been used.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.