Compared to JDBC we have one main advantage in hibernate, which is hibernate inheritance.
Inheritance is one of the most visible facets of Object-relational mismatch. Object oriented systems can model both “is a” and “has a” relationship. Relational model supports only “has a” relationship between two entities. Hibernate can help you map such Objects with relational tables. But you need to choose certain mapping strategy based on your needs.
Note: We can also called this Hibernate Inheritance Mapping as Hibernate Hierarchy
Inheritance is one of the most visible facets of Object-relational mismatch. Object oriented systems can model both “is a” and “has a” relationship. Relational model supports only “has a” relationship between two entities. Hibernate can help you map such Objects with relational tables. But you need to choose certain mapping strategy based on your needs.
Inheritance Mapping Strategies in Hibernate
Hibernate supports 3 types of Inheritance Mappings:Note: We can also called this Hibernate Inheritance Mapping as Hibernate Hierarchy
Blogger Comment
Facebook Comment