Response to 20 Database Design Best Practices

2/3/2012

Firstly read this.

  1. Adding a prefix is a much better idea. Using a schema is fine also. A prefix will separate transaction tables from lookup/static data table. Grouping tables that work together is a better practice.

2.I’m 50/50 on this. Tables have many records, a plural wont hurt.

3.D’Uh

4.Unnecessary prefix should be avoided but necessary and useful ones should be kept,

  1. There is more to it than this. Use Google and get some good advice.

  2. Use bigInts please.

  3. Um no. That wont happen. A big int is 8 bytes and your varChar can be smaller.

  4. No question ever has a yes/no answer ever. You will always want a third choice so choose an int now and save time latter. Using an int means all choice fields are of the same type, not matter how many choices.

  5. OK. We have a winner

  6. This better performance is a myth but generally a good idea.

  7. This does not belong in the list

  8. Actually do this for the highly used tables to spread out IO.

  9. Do this for all databases unless you have one you can lose.

  10. If you add a constraint you will need an index.

15 or use dbknow.com (coming soon)

  1. Google this, there is a lot more to it, choosing the order of fields in the index is crucial

  2. Or save money if you do not need it.

  3. The database will do this for you. Never mind carry on

  4. Huh. This is not helpful or correct.

20 Huh.