Inheritance
Mapping inheritance hierarchies to relational databases means bridging the gap between object oriented and relational models. We start with a slightly modified example from [Bauer2015]:
Todo: Ref/Fig/billing.fig
Simplified Billing details example derived from [Bauer2015]. Notice
inherit.v1.BillingDetails
being an abstract
parent class of two concrete classes
inherit.v1.CreditCard
and
inherit.v1.BankAccount
. The attribute
number
applies both to bank account and credit card
payments.
Since the relational model lacks inheritance completely we have to implement a database schema ourselves. We subsequently explore three main approaches each of which having its own advantages and disadvantages.