Course outline for Hibernate
TechnologyHibernateDuration3-4 days
LevelPrerequisites listed
Pre-requisites
Participants are expected to have good knowledge of Java and should be comfortable with relational database concepts
Lab Setup
Eclipse Oxygen Java/JEE Edition with JDK 8
How we train
Online training for Hibernate
- Instructor-led live cohorts
- Self-paced learning with expert coaches
- 24x7 cloud labs with end-to-end examples
All sessions are 100% hands-on. Labs and activities are derived from real-world work our engineers deliver.
Classroom training
Available for corporate teams in:
- Bengaluru
- Chennai
- Hyderabad
- Mumbai
- Delhi/Gurgaon/NCR
- Pune
Note: Classroom training is for corporate clients only.
Self-paced hands-on sessions are delivered via VirtualCoach.
Detailed Course Outline
Hands-onUnderstanding Relational Database Design
- Understanding ER design and Object Modeling
- Comparing relational database design to Object Modeling
- Types of relationships
- Database storage structures
- Need for indexes to increase efficiency
- Object Relational Mapping
- Impedance mismatch in OR Mapping
- Expectations from an ORM framework
Hibernate Architecture
- SessionFactory
- Session
- Transaction
- Persistent Objects
- Transient Objects
- JDBC/JNDI/JTA
Getting started with Hibernate
- Obtaining Hibernate
- Using Hibernate via Maven
- Hibernate - Hello World
Persistent Classes
- A simple POJO example
- Implementing inheritance
- Implementing equals() and hashCode()
- Dynamic models
Basic O/R Mapping
- Mapping declaration
- Hibernate types
- Mapping a class more than once
- SQL quoted identifiers
Types
- Value Types
- Entity Types
- Custom Types
Collection Mapping
- Persistent Collections
- How to map collections
- Sorted Collections
- Bidirectional associations
Association Mappings
- Handling Unidirectional and Bidirectional associations
- Handling one-to-one, many-to-one, one-to-many and many-to-many relationships
- Association using Join Tables and without Join Tables
Inheritance Mapping
- Inheritance Mapping Strategies
- Table per class hierarchy
- Table per subclass
- Table per concrete class
- Limitations
HQL
- Creating a query
- Paging results
- Parameter binding
- Using positional parameters
- Executing a query
- Using database cursors
Working with Objects
- Hibernate object states
- Making objects persistent
- Loading an object
- Querying
- Modifying persistent objects
- Modifying detached objects
- Automatic state detection
- Deleting persistent objects
- Replicating object between two different datastores
- Flushing the Session
- Transitive persistence
- Using metadata
HQL and JPQL
- Select queries
- Polymorphic Queries
- Comparison Expressions
- Projection
- Joins
- Reporting Queries
Criteria Queries
- Basic criteria queries
- Narrowing the result set
- Ordering the results
- Projections
- Joins
- When to use Criteria vs HQL
Native SQL
- Using SQLQuery
- Named SQL Queries
- Custom SQL for create, update and delete
- Custom SQL for loading
Improving Performance
- Fetching strategies
- Second level cache
- Query Cache
- Understanding collection performance