

20 Database Design Best Practices - pradeepbheron
http://codebalance.blogspot.com/2011/07/20-database-design-best-practices.html

======
noblethrasher
Three hours and no one has jumped on this one?

    
    
        Keep passwords as encrypted for security. Decrypt them in application when required
    

DON'T encrypt passwords, use a good one-way hash. Actually, just use
[s|b]crypt.

------
viggity
I know this is a religious debate but this one bugs the hell out of me:

Use singular for table names (i.e. use StudentCourse instead of
StudentCourses). Table represents a collection of entities, there is no need
for plural names.

NOOOOOO!!!!!! The table stores MULTIPLE things, ergo, the table name should be
pluralized. SQL makes more sense to read aloud this way. I mean, does anyone
name their (code's) collections as singular?

~~~
pbreit
Yeah, the jury seems to still be out on this one. If you are using SQL then
plural sounds better. But if you are using some sort of ORM or data access
layer, singular frequently works better (ie "rows =
db(db.item.id>0).select()").

#10 also seems to be routinely violated, again, especially when ORM is used.

