Mapping meaning in hibernate-

Connection between java class to database tables

Types of mapping in hibernate-

1- Inheritance Mapping-

When java classes are having inheritance, their tables can be created using 3 ways-

1- Table per class hierarchy
2–Table per sub-class hierarchy
3-Table per concrete class hierarchy

2- Collection Mapping-

When java class is having collection object, they can be stored according to their type of collection –

1-list mapping
2-set mapping
3-map mapping

3- Association mapping-

When java class is having reference of another java class, their tables can be created using 3 ways-

1-One to one
2-One to many or many to one
3-Many to many

Advertisements