Tips to design a database for developers

Some other thoughts

In general, if the database can do it for you, leave the database for you. The databases know how to handle data about 453.7 times better than you. You are trying to do your job.

If you feel like adding fields ending 1, 2, 3, etc., no. Read normalization.

Use the correct data type for the column. For the date you use a number for boolean or thong.

Consider the addition of adding strongly CreatedAt and UpdatedAt Timetamp field for each table. You will be surprised how often you are happy to do it. The automatic time stamps with triggers and become useful and painless.

Parameterized stored procedures are your friends. Use them as much as possible.

Your query analyzer is the order better when deciding what the best way to ask data than you.

Beware of Booleans. Null turns Booleans into quantum states – Snow True or False Unit Somone runs a question. You use booolean if you don’t know exactly what null means in this context.

You depend on the straps to define the status. Use Inteead Enmeral values and contribute that data is never bad. Don’t status="bananna" Cause a mistake because someone ass an array.

The way you are with a lot of DOS and Dons. The most important meal is again to choose a set of rules and to project them ruthlessly. Do it today and save a lot of headaches on the road. The future, you will be, believe me.

Leave a Comment