- 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
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 tools/frameworks provides integration with Hibernate?
Answer : D
Explaination
All of the above provide integration with Hibernate.
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.createSQLQuery creates a new instance of Query for the given HQL query string.
Answer : B
Explaination
Session.createSQLQuery creates a new instance of Query for the given SQL query string.
Q 4 - Which of the following is true about <class> element?
B - The Java class name is specified using the name attribute of the class element.
C - The database table name is specified using the table attribute of the class element.
Answer : D
Explaination
The <class> elements are used to define specific mappings from a Java classes to the database tables. The Java class name is specified using the name attribute of the class element and the database table name is specified using the table attribute.
Q 5 - Which of the following element maps java.util.Map property in hibernate?
Answer : D
Explaination
java.util.Map property is mapped with a <map> element and initialized with java.util.HashMap.
Q 6 - Which of the following situation represents many-to-many relationship?
B - An employee can have multiple certificates.
Answer : A
Explaination
An employee can have multiple certificates and same certificate can be conferred to many employees. Such situation represents many-to-many association.
Q 7 - What HQL stands for?
Answer : A
Explaination
HQL stands for Hibernate Query Language.
Q 8 - Which of the following is true about query level cache in hibernate?
A - Query level cache is an optional feature.
C - Query level cache is only useful for queries that are run frequently with the same parameters.
Answer : D
Explaination
Query level cache is an optional feature and requires two additional physical cache regions that hold the cached query results and the timestamps when a table was last updated. This is only useful for queries that are run frequently with the same parameters.
Answer : B
Explaination
Persistent objects are saved and retrieved through a Session object.
Q 10 - Which of the following is true about HQL?
A - Hibernate Query Language (HQL) is an object-oriented query language.
Answer : C
Explaination
Hibernate Query Language (HQL) is an object-oriented query language, similar to SQL, but instead of operating on tables and columns, HQL works with persistent objects and their properties.
To Continue Learning Please Login
Login with Google