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):
alt text http://dl.dropbox.com/u/2792776/screenshots/2010-04-13_2146-1.png
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.