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 inheritance (i.e., one "bill_items" table with a "type" column) or polymorphism (separate tables for each BillItem type), and why.