- 05th May, 2021
- 500 Followers
Latest MCQ Tests
Pratice HR Questions
Hibernate MCQ Questions and Answers
1) Which of the following is not an advantage of using Hibernate Query Language?
2) In which file database table configuration is stored?
3) Which of the following is not an inheritance mapping strategies?
4) Which of the following method is used inside session only?
5) Which of the following methods hits database always?
6) SessionFactory is a thread-safe object.
7) What is ORM?
8) The QBC stands for __.
9) Which of the following methods returns proxy object?
10) Which of the following is not a core interface of Hibernate?
11) Which of the following object is used to create SessionFactory object in hibernate?
12) The POJOs stands for ___.
13) Which of the following is not an advantage of Hibernate Criteria API?
14) Which of the following is NOT a fetching strategy?
15) Which of the following are most common configuration methods of Hibernate Configuation?
16) Which of these simplifies an Object Relational Mapping tool?
17) Which of the following is FALSE about Session in hibernate
18) Which of the following is not a Session method?
19) Which statement is correct?
20) Does Hibernate support polymorphism?
21) Which facility provides tools for development of distributed, web based solutions.
22) Which of the following is NOT a mapping association used in Hibernate?
23) What does the Session object hold?
24) Abbreviate the term HQL?
Hibernate Online Test Questions (Hibernate FAQs)
1) What is Hibernate?
Hibernate is a Java framework that is used to simplify the development of Java applications to interact with the database. Hibernate is an open-source, lightweight, ORM i.e. Object Relational Mapping tool.
2) What is an ORM?
ORM or Object-relational mapping is used to write the complicated queries by using the object-oriented paradigm of the preferred programming language.
3) List some advantages of hibernate over JDBC?
Advantages of Hibernate over JDBC are:
- Hibernate is database-independent.
- b. No need to learn SQL.
- c. There is no need for Query tuning in Hibernate.
4) What is first level cache in hibernate?
The first-level cache is also known as session level cache as it is always associated with session level objects. It minimizes database interaction by caching the object's state.
5) What is dirty checking in hibernate?
The dirty Checking concept is used to check and update the modification. It automatically modifies the updated fields without changing the remaining fields.
6) What is the criteria query in hibernate?
The Criteria Query is used to retrieve the records according to the specific criteria. It is basically a data retrieval technique.
7) How many layers are available in hibernate architecture?
The Hibernate architecture is consists of a total of four layers. The four layers are the java application layer, hibernate framework layer, backhand API layer, and database layer.
8) What does the session object hold in hibernate?
In Hibernate, the Session object holds the first level cache data.
9) What is the default annotation for a property in hibernate?
@Id annotation is the default annotation for a property in the java framework, it gives access to the features by placing the annotation on getter and setter methods.
10) Does Hibernate Session interface thread-safe in Java?
No, Hibernate session is not a thread-safe object It is required to manually manage transactions and sessions by developer