
- Hibernate Tutorial
- Hibernate - Home
- ORM - Overview
- Hibernate - Overview
- Hibernate - Architecture
- Hibernate - Environment
- Hibernate - Configuration
- Hibernate - Sessions
- Hibernate - Persistent Class
- Hibernate - Mapping Files
- Hibernate - Mapping Types
- Hibernate - Examples
- Hibernate - O/R Mappings
- Hibernate - Annotations
- Hibernate - Query Language
- Hibernate - Criteria Queries
- Hibernate - Native SQL
- Hibernate - Caching
- Hibernate - Batch Processing
- Hibernate - Interceptors
- Hibernate Useful Resources
- Hibernate - Questions and Answers
- Hibernate - Quick Guide
- Hibernate - Useful Resources
- Hibernate - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hibernate Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Hibernate Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Which of the following is true about Hibernate?
A - Hibernate is an Object-Relational Mapping(ORM) solution for JAVA.
B - Hibernate is an Object-Relational Mapping(ORM) solution for .NET
Answer : A
Explaination
Hibernate is an Object-Relational Mapping(ORM) solution for JAVA.
Q 2 - Which of the following is not a core component of Hibernate?
Answer : B
Explaination
Provider is not a core component of Hibernate.
Q 3 - Session.createCriteria creates a new Criteria instance, for the given entity class, or a superclass of an entity class.
Answer : A
Explaination
Session.createCriteria creates a new Criteria instance, for the given entity class, or a superclass of an entity class.
Q 4 - Which method is used to save or update the state of the given instance from the underlying database?
Answer : A
Explaination
Session.saveOrUpdate either saves(Object) or updates(Object) the given instance.
Q 5 - Which element of hbm.xml automatically generate the primary key values?
Answer : B
Explaination
The <generator> element within the id element is used to automatically generate the primary key values.
Q 6 - Which of the following element is used to represent one-to-one relationship in hibernate?
Answer : A
Explaination
<many-to-one> element is used to define one-to-one association.
Q 7 - Which of the following is true about HQL?
A - HQL takes java objects in the same way as SQL takes tables.
B - HQL is a Object Oriented Query language
Answer : D
Explaination
HQL takes java objects in the same way as SQL takes tables. HQL is a Object Oriented Query language and is database independent.
Q 8 - When a Nonstrict-read-write concurrency strategy is to be used?
Answer : C
Explaination
Nonstrict-read-write strategy makes no guarantee of consistency between the cache and the database. Use this strategy if data hardly ever changes and a small likelihood of stale data is not of critical concern.
Answer : A
Explaination
A Session is used to get a physical connection with a database.
Q 10 - Which of the following is true about INSERT CLAUSE in HQL?
B - HQL supports INSERT INTO clause without any restriction.
Answer : A
Explaination
HQL supports INSERT INTO clause only where records can be inserted from one object to another object.