Object Relational Mapping
- Object-relational mapping is used to map object-oriented programming objects to relational databases managed by Oracle, DB2, Sybase, and other relational database managers
- Object-relational mapping is the process of transforming between object and relational databases.
Introduction To Hibernate
- Hibernate is java-based middleware designed to complete the Object Relational mapping (ORM).
- Hibernate is a free, open source Java package that makes it easy to work with relational databases.
- Hibernate provides a solution to map database tables to a class.
- It copies the database data to a class. In the other direction it supports to save objects to the database. In this process the object is transformed to one or more tables.
The SessionFactory configures hibernate for application using supplied configuration file (hibernate.properties or hibernate.cfg.xml) and allows for session object to be instantiated.
When the session object is instantiated, a connection is made to the database.
The Transaction interface lets you make insure that any error occurs between the start and end of the transaction will cause all the transaction fail.
The Query interface lets you query the database for objects.
Hibernate Development Environment
Install jar files as hierarchy given below
Hibernate Application Example
+persist (Object to be persist)
NEXT: Hibernate Mapping Declaration >>>>