문제

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