What are the [dis]advantages of using a key/value table over nullable columns or separate tables?

后端 未结 5 753
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 10:02

I\'m upgrading a payment management system I created a while ago. It currently has one table for each payment type it can accept. It is limited to only being able to pay for

5条回答
  •  不知归路
    2020-12-07 10:41

    At first sight, I would go for option 2 (or 3): when possible, generalize. Option 4 is not very Relational I think, and will make your queries complex. When confronted to those question, I generally confront those options with "use cases":
    -how is design 2/3 behaving when do this or this operation ?

提交回复
热议问题