The Top 60 Hibernate Interview Questions post is a summary of some of the most important questions concerning the Hibernate Framework, that you may be asked to answer in an interview. Our Hibernate interview questions take you through the complete hibernate framework and provide a thorough understanding of the framework using the questions and answers. With these interview questions, we ensure that you no longer need to worry about an interview related to Hibernate framework.
1.What is Hibernate framework?
2.What is an Object Relational Mapping (ORM)?
3.What is the purpose of Configuration Interface in Hibernate?
4.What is Object Relational Impedance Mismatch?
5.What are the main problems of Object Relational Impedance Mismatch?
6.What are the key characteristics of Hibernate?
7.Can you tell us about the core interfaces of Hibernate framework?
8.How will you map the columns of a DB table to the properties of a Java class in Hibernate?
9.Does Hibernate make it mandatory for a mapping file to have .hbm.xml extension?
10.What are the steps for creating a SessionFactory in Hibernate?
11.Why do we use POJO in Hibernate?
12.What is Hibernate Query Language (HQL)?
13.How will you call a stored procedure in Hibernate?
14.What is Criteria API in Hibernate?
15.Why do we use HibernateTemplate?
16.How can you see SQL code generated by Hibernate on console?
17.What are the different types of collections supported by Hibernate?
18.What is the difference between session.save() and session.saveOrUpdate() methods in Hibernate?
19.What are the advantages of Hibernate framework over JDBC?
20.How can we get statistics of a SessionFactory in Hibernate?
21.What is the Transient state of an object in Hibernate?
22.What is the Detached state of an object in Hibernate?
23.What is the use of Dirty Checking in Hibernate?
24.What is the purpose of Callback interface in Hibernate?
25.What are the different ORM levels in Hibernate?
26.What are the different ways to configure a Hibernate application?
27.What is Query Cache in Hibernate?
28.What are the different types of Association mappings supported by Hibernate?
29.What are the different types of Unidirectional Association mappings in Hibernate?
30.What is Unit of Work design pattern?
31.In Hibernate, how can an object go in Detached state?
32.How will you order the results returned by a Criteria in Hibernate?
33.How does Example criterion work in Hibernate?
34.How does Transaction management work in Hibernate?
35.How can we mark an entity/collection as immutable in Hibernate?
36.What are the different options to retrieve an object from database in Hibernate?
37.How can we auto-generate primary key in Hibernate?
38.How will you re-attach an object in Detached state in Hibernate?
39.What is the first level of cache in Hibernate?
40.What are the different second level caches available in Hibernate?
41.Which is the default transaction factory in Hibernate?
42.What are the options to disable second level cache in Hibernate?
43.What are the different fetching strategies in Hibernate?
44.What is the difference between Immediate fetching and Lazy collection fetching?
45.What is ‘Extra lazy fetching’ in Hibernate?
46.How can we check is a collection is initialized or not under Lazy Initialization strategy?
47.What are the different strategies for cache mapping in Hibernate?
48.What is the difference between a Set and a Bag in Hibernate?
49.How can we monitor the performance of Hibernate in an application?
50.How can we check if an Object is in Persistent, Detached or Transient state in Hibernate?
51.What is ‘the inverse side of association’ in a mapping?
52.What is ORM metadata?
53.What is the difference between load() and get() method in Hibernate?
54.When should we use get() method or load() method in Hibernate?
55.What is a derived property in Hibernate?
56.How can we use Named Query in Hibernate?
57.What are the two locking strategies in Hibernate?
58.What is the use of version number in Hibernate?
59.What is the use of session.lock() method in Hibernate?
60.What inheritance mapping strategies are supported by Hibernate?
That’s all about Top 60 Hibernate Interview Questions.