Modeling a cellphone bill: should I use single-table inheritance or polymorphic associations?
- by Horace Loeb
In my domain:
Users have many Bills
Bills have many BillItems (and therefore Users have many BillItems through Bills)
Every BillItem is one of:
Call
SMS (text message)
MMS (multimedia message)
Data
Here are the properties of each individual BillItem (some are common):
My question is whether I should model this arrangement with single-table…