[Fixed]-Databases: Good practice to have minimal fields?

1👍

Really not very pleasant to have to much field, but if a field is month like that, you can use computed field. I don’t know if that exists in Django. If not, just use a view to show that month. You will get trouble when updating that and forgot to update one of the field holding same information.

0👍

My experience: if database is stored on fast hard disk, best much more fields, because you save time to write code and cpu resources of machine where is the client of database; instead of databse is on old or not fast machine, is better that the client make the job.
Same if the connection from client and server is slow.

0👍

What you want to do is called Database Denormalization. By doing that you can optimize the read performance of the table, but you also have to take responsibility that any redundant copies are kept consistent.

So do you really have such performance drawback? (I doub it but..) If you really have, what you can do before adding redundant columns is to try adding column indexes.

👤Todor

Leave a comment