Inheritance is a distinctive aspect of object oriented technology. Inheritance could not be utilized in earlier versions of EJB as an EJB 2.x entity bean cannot extend another EJB 2.x entity bean. With EJB 3, entities are more object oriented in that one entity can extend another. However, this leaves us with the matter of mapping entities in an inheritance hierarchy onto a relational database.
There are a number of strategies we can use to map an inheritance hierarchy onto relational database tables. As an example, suppose the Account class has CheckingAccount and SavingsAccount subclasses:
CheckingAccount and SavingsAccount extend the base Account class. As the names suggest, they are entities that represent checking accounts and savings accounts respectively.