We're trying to come up with the data model of Payment Method. There can be several kinds of payment methods like Card, Bank Transfer, Wallet, which further can be categorized for e.g. Card into credit/debit cards, Bank Transfer into ACH/SEPA and the like.
So this is about modelling inheritance into database tables. One option is to use single table inheritance. Senior folks in my team call single table as denormalized table. But I don't understand why? I don't see any insert/delete/update anomalies here, each payment method record is independent in its own, there are no redundancies. It's just there will be lots of nulls in the table as set of columns will be union of all payment methods.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…