Вопрос

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

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top