Best way to model Customer <--> Address

后端 未结 12 1667
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 02:22

Every Customer has a physical address and an optional mailing address. What is your preferred way to model this?

Option 1. Customer has fo

12条回答
  •  暖寄归人
    2020-11-30 02:41

    Option 3 is too restrictive, and option 1 cannot be extended to allow for other address types without changing the schema. Option 2 is clearly the most flexible and therefore the best choice.

提交回复
热议问题