Three customer addresses in one table or in separate tables?

前端 未结 7 2265
慢半拍i
慢半拍i 2021-02-07 17:43

In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class:

7条回答
  •  爱一瞬间的悲伤
    2021-02-07 18:04

    My two cents is that de-normalizing the way you describe is OK, if you have a compelling reason. Sometimes that reason can be as simple as a high level of confidence you will never need the normalized form. As Stefan Mai implied, it's much easier to just retrieve and update a single table, if you only ever need to work with the three types of addresses you indicated. On the other hand, if the three addresses requirement has any possibility of changing then it probably will, and early-on is the better time to normalize.

提交回复
热议问题