Hibernate MCQ

Hibernate MCQ | Freshers & Experienced

  • Sharad Jaiswal
  • 13th Feb, 2021

We have listed here Best Hibernate MCQ Questions for your basic knowledge of Hibernate. This Hibernate MCQ Test contains 30 multiple Choice Questions. You have to select the right answer to every question

Hibernate MCQ Questions

1) Which of the following isn't a core interface of Hibernate?

  • A. SessionManagement
  • B.Session
  • C.Configuration
  • D.Criteria

2) Is SessionFactory a thread-safe object?

  • A. Yes
  • B.No

3) Which of the following methods returns proxy object?

  • A. get()
  • B.getDatabase()
  • C.load()
  • D.loadDatabase()

4) Which of the following method is used inside session only?

  • A. merge()
  • B.update()
  • C.end()
  • D.kill()

5) Select the methods hits database always?

  • A. getDatabase()
  • B.get()
  • C.loadDatabase()
  • D.load()

6) Choose the inheritance model which isn't available in Hibernate?

  • A. Table Per sub-class
  • B.Table Per class hierarchy
  • C.Table Per Object
  • D.Tables Per Concrete Class

7) Which of the method is easy for a Java programmer to add a criterion?

  • A. HCQL
  • B.SQL
  • C.HQL
  • D.All of the above

8) Hibernate caching improves the performance of the application by pooling the object in the cache.

  • A. True
  • B.False

9) In the elements of Hibernate architecture is a factory of session and client of ConnectionProvider, It holds the second level cache (optional) of data is _____.

  • A. ConnectionProvider
  • B.Session
  • C.Transaction
  • D.SessionFactory

10) What is the full form of HQL?

  • A. Hibernate Queue Language
  • B.Hipher Query Language
  • C.Hibernate Query Language
  • D.None of these

11) How many layers are accessible in Hibernate architecture?

  • A. 3
  • B.4
  • C.6
  • D.2

12) Which object is used to create SessionFactory object in hibernate?

  • A. Configuration
  • B.SessionFactory
  • C.Session
  • D.Transaction

13) In which file database table configuration is stored?

  • A. .dbm
  • B..hbm
  • C..sql
  • D..ora

14) What is the full form of QBC?

  • A. Query By Code
  • B.Query By Criteria
  • C.Query By Column
  • D.Query By Call

15) What is the full form of ORM?

  • A. Operating Related Mapping
  • B.Object Relational Mapping
  • C.Operating Rate Mapping
  • D.Object Rate Mapping

16) What is the full form of POJOs?

  • A. Plane Old Java Objects
  • B.Particular Old Java Objects
  • C.Plain Open Java Objects
  • D.Plain Old Java Objects

17) Identify the true statement about hibernate annotations?

  • A. All the metadata is clubbed into the POJO java file along with the code this helps the user to understand the table structure and POJO simultaneously during the development.
  • B.Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping.
  • C.Both 1 and 2
  • D.None of these

18) Hibernate is a ___________?

  • A. SQL Tool
  • B.ORM
  • C.Programming Tool
  • D.CRM

19) Is JPA a framework?

  • A. Yes
  • B.No

20) What can be done to completed a transaction in Hibernate?

  • A. Rollback
  • B.Commit
  • C.Both 1 and 2
  • D.None of these

21) Identify the level of ORM quality?

  • A. Full object mapping
  • B.Medium object mapping
  • C.Object mapping
  • D.All of the above

22) Who invented hibernate?

  • A. Lucas King
  • B.Gavin King
  • C.Elijah King
  • D.None of these

23) Identify the true statement about <class> element?

  • A. The database table name is specified using the table attribute of the class element.
  • B.The Java class name is specified using the name attribute of the class element.
  • C.The <class> elements are used to define specific mappings from a Java classes to the database tables.
  • D.All of the above

24) What is the full form of JDBC?

  • A. Java DB Connectivity
  • B.Java Data Bind Connect
  • C.Java Database Connectivity
  • D.Java Data Bind Connector

25) Select the element maps java.util.Map property in hibernate?

  • A. <:map>
  • B.<:set>
  • C.<:list>
  • D.<:bag>

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

React JS MCQ
Angular Js MCQ
Angular 2 MCQ