Hibernate tutorial for beginners and professionals with examples in eclipse on Basics, Object Relational Mapping (ORM), Query Language, Native SQL, Interceptors, Persistent Classes, Persistent Objects, Collections, Associations and components and more.
What is JDBC?
JDBC refers to the Java Database Connectivity. It provides java API that allows Java programs to access database management systems (relational database). The JDBC API consists of a set of interfaces and classes which enables java programs to execute SQL statements. Interfaces and classes in JDBC API are written in java.
Why Object-relational mapping (ORM)?
As we discussed JDBC provides a way for Java programs to communicate with the relational database. Java follows the object model and represents the data in the form of interconnected graph of objects whereas relational database represents the data in the tabular form. This creates a mismatch between the object model and the relational database. ORM resolve this mismatch problem.
What is ORM?
ORM refers to the Object-Relational Mapping. It is a programming technique for converting data between incompatible type systems like relational databases and object oriented programming languages like java.
Commonly used Java ORM Frameworks:
- Hibernate.
- Enterprise JavaBeans Entity Beans
- Spring DAO
Hibernate Basic tutorial:
- Hibernate framework.
- Hibernate architecture.
- Hibernate configuration file with example.
- Persistent class with example.
- Object states in Hibernate with example.
- Hibernate mapping file with example.
- Hibernate transaction management with example.
- Hibernate example using xml mapping.
- Hibernate example using annotation.
Hibernate Collection Mappings tutorial:
- Hibernate collections mappings with example.
- Hibernate Set mapping with example.
- Hibernate SortedSet mapping with example.
- Hibernate list mapping with example.
- Hibernate bag mapping with example.
- Hibernate Map mapping with example.
- Hibernate SortedMap mapping with example.
Hibernate Association Mappings tutorial:
- Hibernate association mappings with example.
- Hibernate One-to-One Mapping using xml with example.
- Hibernate One-to-Many mapping using xml with example.
- Hibernate Many-to-One mapping using xml with example.
- Hibernate Many-to-Many mapping using xml with example.
Hibernate Component Mappings tutorial:
Hibernate Query Language tutorial:
Hibernate Criteria Query Language tutorial:
- Hibernate Criteria Query Language (HCQL) with example.
- Hibernate criteria basic query example.
- Hibernate criteria restrictions query example.
- Hibernate criteria ordering query example.
- Hibernate criteria pagination query example.
- Hibernate criteria projections query example.
Hibernate Named and Native Query tutorial:
- Hibernate named query using xml with example.
- Hibernate named query using annotation with example.
- Hibernate native SQL with example.
Maven eclipse hibernate:
Differences:
- What is difference between Hibernate Session get() and load() method?
- What is difference between openSession and getCurrentSession?
- What is the difference between session save and session persist method in hibernate?
- What is the difference between session.save session.saveorupdate and session.persist in hibernate?
- What is the difference between session.merge vs session.update in hibernate?
Hibernate interview questions:
- Hibernate interview questions and answers.
- Use of dialect
- Dialects in hibernate
- Lazy loading in hibernate
- Eager loading in hibernate
- Lazy vs Eager
- n+1 problem in hibernate
- Caching in hibernate
- Second level cache in hibernate