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

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top