Question

I have inherited data objects (for example, User, Employee, Manager and so on). We use our self-written ORM to manage the data in MySql database. How is it better to store the data:

  • in normalized format divided into different MySql-tables linked with 1-to-1 relation (and using multiple joining to manage data);

  • or using denormalized way in one phisycal table with a lot of unused fields in every particular case.

Thank you in advance

Était-ce utile?

La solution

Generally your database should be fully normalized unless you have a very good reason not to. The more you de-normalize your data, the more sync problems you can have and the more bugs you can introduce.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top