Hibernate Practice Exam
About Hibernate
Hibernate is a Java framework that simplifies the development of Java application to interact with the database. It is an open source, lightweight, ORM (Object Relational Mapping) tool. Hibernate implements the specifications of JPA (Java Persistence API) for data persistence. Being an open-source framework, it is available for everyone without any cost.
An ORM tool simplifies the data creation, data manipulation and data access. It is a programming technique that maps the object to the data stored in the database.
The advantage of being a lightweight framework can be seen considerably smaller package for installation. The efficiency increases with not using any container for execution. Even though hibernate can work with multiple technologies at once, but it does not mean that hibernate cannot work alone. We can work on hibernate alone as well i.e. without any technologies.
Hibernate supports a variety of technologies.
• XDoclet Spring
• Maven
• Eclipse Plug-ins
• J2EE
Why is Hibernate important?
The main advantages of Hibernate which makes it important are
• ORM - Hibernate ORM easily solves the data mismatch found between the object oriented classes of an application and relational database. ORM connects these two with ease through the use of the XML mapping file. It enables to gain complete control over the application as well as the database design. This feature makes Hibernate flexible and powerful.
• Transparent Persistence - Hibernate’s transparent persistence ensures the automatic connection between the application’s objects with the database tables. This feature prevents developers from writing lines of connection code. Transparent persistence enables hibernate to reduce development time and maintenance cost.
• Database independent - Hibernate is database independent. It can be used to connect with any database like Oracle, MySQL, Sybase and DB2 to name a few. This cross database portability of Hibernate is easily achieved by changing a parameter ‘database dialect’ in the configuration file. Database independency is considered as one of the major advantages of Hibernate.
• HQL - Hibernate supports a powerful query language called HQL (Hibernate Query Language). This query language is more powerful than SQL and is completely object oriented. HQL’s advanced features like pagination and dynamic profiling are not present in SQL.
• Dual-layer Caching - Hibernate supports both first level and second level caching mechanisms. The first level caching is associated with Session object which is used by default. The second level caching is related to the Session Factory object.
• Through caching concept, Hibernate retains the objects in cache to reduce repeated hits to the database. This feature makes Hibernate highly scalable and optimizes the application’s performance.
• Version Property - Hibernate supports optimistic locking through its version property feature. This functionality supports multiple transactions without affecting one another.•
• Open Source - Hibernate is available as an open source software with zero cost product license. This light weight software can be downloaded from its source website hibernate.org. The latest version of Hibernate that can be downloaded is 4.3.10.
• Scalability - Hibernate is highly scalable. It adapts itself in any environment. It may be an intranet application with few hundreds of users or large critical application with thousands of users. Hibernate supports both the applications equally.
• Lazy-Loading - The lazy-loading concept fetches only the necessary object that is required for the execution of an application.
Important Concepts for Hibernate Practice Exam
- Java Persistence Basics
- Hibernate Querying
- Hibernate and Relationships
- Hibernate and Inheritance Mapping
- The Criteria API
- Hibernate and Java Persistence
Who should take the Hibernate Exam?
• IT professionals
• Java Programmers or Software Developers
• Anyone who wants to assess their Hibernate skills
• Java and Hibernate consultants
• Professionals working in outsourced companies responsible for development using Hibernate
• Any professional with skills and knowledge on Hibernate
• Anyone interested in Hibernate
Hibernate Practice Exam Objectives
Hibernate exam focuses on assessing your skills and knowledge in designing and developing application using Hibernate.
Hibernate Practice Exam Pre-requisite
There are no prerequisites for the Hibernate exam. Candidate should be well versed in Java and Hibernate to clear the exam.
Hibernate Certification Course Outline
1. Java Persistence Basics
1.1 Issues with Persistence layers and Object-Relational Mapping (ORM)
1.2 Hibernate Overview and Benefits
1.3 Hibernate architecture overview
1.4 POJO (Plain Old Java Object) Based Mapping
2. Hibernate Basics
2.1 Overview of the Hibernate distribution
2.2 Configuring Hibernate
2.3 hibernate.cfg.xml file
2.4 SessionFactory configuration
2.5 Connection properties, Database dialect
2.6 Configuration class, Session Interface
2.7 "Hello World" Program for Hibernate
2.8 Mapping a Class
2.9 Persistent Entity Class, Hibernate Mapping
2.10 apping the Entity Class
2.11 Primary keys: Id property, Generated Id
2.12 Working with sessions and Persistent Objects
3. Hibernate Querying
3.1 Inserting and Updating Entities
3.2 HQL - Hibernate Query Language Overview
3.3 The Query Interface
3.4 Creating and working with queries
3.5 Named Queries, Projection Queries, Aggregate Queries
4. The Persistence Lifecycle
4.1 Transaction Overview and Transactions in Hibernate
4.2 Hibernate Transaction API (in Managed and Non-managed Environments)
4.3 The lifecycle of managed objects
4.4 Persistent, transient, and detached objects
4.5 The Persistence (Session) Context (Lifespan, Relation to Managed Objects,
4.6 Propagation)
4.7 Contextual Sessions
4.8 Synchronization to the Database
4.9 The Session as cache
5. Hibernate and Relationships
5.1 Object Relationship Overview
5.2 Mapping Collections of Value Objects
5.3 Entity Relationships: 1-N, N-1, N-N, 1-1
5.4 Mapping Entity Relationships
5.5 Uni and Bi-directional Relationships
5.6 The Relationship "inverse"
5.7 Cascading Over Relationships
6. Hibernate and Inheritance Mapping
6.1 Entity Inheritance with Hibernate
6.2 Table-per-class mapping
6.3 Table per Subclass mapping
6.4 Table per Concrete Class mapping
7. Additional Querying Capabilities
7.1 Projection Queries, Aggregate queries
7.2 Bulk updates and deletes
7.3 Native SQL Queries
7.4 Query Filters
8. The Criteria API
8.1 Overview of the Criteria API
8.2 Working Querying with the Criteria API
8.3 Query by Example
9. Hibernate and Java Persistence
9.1 Overview of Java Persistence
9.2 Relationship between Java Persistence and Hibernate
9.3 Overview of Annotations
9.4 Mapping Entities with Hibernate Annotations
9.5 The EntityManager, Persistence Context and Persistence Unit
9.6 Working with Transactions - EntityTransaction, Managed, and Unmanaged Environments
9.7 JPQL - Java Persistence Query Language
9.8 Versioning
9.9 Relationship
Exam Format and Information
Certification name – Hibernate Certification
Exam duration – 60 minutes
Exam type - Multiple Choice Questions
Eligibility / pre-requisite - None
Exam language - English
Exam format - Online
Passing score - 25
Exam Fees - INR 1199