Hibernate Interview Questions

 
1.
What is Hibernate?
2.
What is ORM?
3.
What does an ORM solution comprises of?
4.
What are the different levels of ORM quality?
5.
What is a pure relational ORM?
6.
Why do you need ORM tools like hibernate?
7.
What is a meant by light object mapping?
8.
What is a meant by medium object mapping?
9.
What is meant by full object mapping?
10.
What are the benefits of ORM and Hibernate?
11.
What the Core interfaces are of hibernate framework?
12.
What are Callback interfaces?
13.
What should SessionFactory be placed so that it can be easily accessed?
14.
What are POJOs?
15.
What is object/relational mapping metadata?
16.
What is HQL?
17.
What are the most common methods of Hibernate configuration?
18.
What are the important tags of hibernate.cfg.xml?
19.
What are the Core interfaces are of Hibernate framework?
20.
What role does the Session interface play in Hibernate?
21.
What role does the SessionFactory interface play in Hibernate?
22.
What is the general flow of Hibernate communication with RDBMS?
23.
What is Hibernate Query Language (HQL)?
24.
How do you map Java Objects with Database tables?
25.
What Does Hibernate Simplify?
26.
What is the difference between load() and get()?
27.
What is the difference between and merge and update?
28.
How do you define sequence generated primary key in hibernate?
29.
Define cascade and inverse option in one-many mapping?
30.
What does it mean to be inverse?
31.
What do you mean by Named - SQL query?
32.
How do you invoke Stored Procedures?
33.
Explain Criteria API?
34.
Define HibernateTemplate?
35.
What are the benefits does HibernateTemplate provide?
36.
How do you switch between relational databases without code changes?
37.
If you want to see the Hibernate generated SQL statements on console, what should we do?
38.
What are derived properties?
39.
What is component mapping in Hibernate?
40.
What is the difference between sorted and ordered collection in hibernate?
41.
How will you configure Hibernate?
42.
What is a SessionFactory? Is it a thread-safe object?
43.
What is a Session? Can you share a session object between different theads?
44.
What are the benefits of detached objects?
45.
What are the pros and cons of detached objects?
46.
How does Hibernate distinguish between transient (i.e. newly instantiated) and detached objects?
47.
What is the difference between the session.get() method and the session.load() method?
48.
What is the difference between the session.update() method and the session.lock() method?
49.
How would you reatach detached objects to a session when the same object has already been loaded into the session?
50.
What are the general considerations or best practices for defining your Hibernate persistent classes?
51.
What does ORM consists of?
52.
What are the ORM level?