Course Outline

Participant Profile

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


3-4 days

Course Outline

Understanding 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
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
  • 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
  • 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
  • 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

The classroom training will be provided in Bangalore (Bengaluru), Chennai, Hyderabad or Mumbai and will be conducted in the client's premises. All the necessary hardware/software infrastructure must be provided by the client.