Published on

Hibernate

Authors
Time yourself:
Your progress:

00:30:00

0%

Basics and Introduction

1. What is Hibernate, and why is it used?

Flag important question
Mark as complete

2. What are the advantages of using Hibernate over JDBC?

Flag important question
Mark as complete

3. What is the Hibernate architecture?

Flag important question
Mark as complete

4. What is the difference between Hibernate and Spring JPA?

Flag important question
Mark as complete

Configuration

5. How do you configure Hibernate with XML and annotations?

Flag important question
Mark as complete

6. What is the purpose of hibernate.cfg.xml?

Flag important question
Mark as complete

7. How do you set up Hibernate with a Java configuration (without XML)?

Flag important question
Mark as complete

8. What is the role of the SessionFactory?

Flag important question
Mark as complete

Mapping

9. What is ORM (Object-Relational Mapping)?

Flag important question
Mark as complete

10. How do you map a Java class to a database table?

Flag important question
Mark as complete

11. What is the difference between @Entity and @Table annotations?

Flag important question
Mark as complete

12. How do you map relationships (one-to-one, one-to-many, many-to-many)?

Flag important question
Mark as complete

13. What are the advantages of lazy loading in mapping?

Flag important question
Mark as complete

14. How do you perform create, read, update, and delete operations in Hibernate?

Flag important question
Mark as complete

15. What's the difference between transient and detached entities?

Flag important question
Mark as complete

16. How do you use save() vs persist()?

Flag important question
Mark as complete

17. What is the difference between update() and merge()?

Flag important question
Mark as complete

18. How does Hibernate handle primary key generation?

Flag important question
Mark as complete

Caching

19. What is caching in Hibernate, and why is it important?

Flag important question
Mark as complete

20. What is the difference between first-level and second-level caching?

Flag important question
Mark as complete

21. What are the popular caching providers in Hibernate?

Flag important question
Mark as complete

Querying

22. What is HQL (Hibernate Query Language)?

Flag important question
Mark as complete

23. How is HQL different from SQL?

Flag important question
Mark as complete

24. What is the Criteria API in Hibernate?

Flag important question
Mark as complete

25. How do you use native SQL queries in Hibernate?

Flag important question
Mark as complete

Transactions and Concurrency

26. How does Hibernate manage transactions?

Pro Content

27. What is the difference between commit() and flush()?

Pro Content

28. What are the use cases for optimistic locking and pessimistic locking?

Pro Content

29. What are the isolation levels in Hibernate?

Pro Content

Performance Tuning

30. How do you optimize Hibernate queries?

Pro Content

31. How does lazy and eager loading impact performance?

Pro Content

32. How do you analyze the SQL generated by Hibernate?

Pro Content

33. What are batch processing and its benefits in Hibernate?

Pro Content

Advanced Features

34. What are Hibernate interceptors and event listeners?

Pro Content

35. How do you implement a custom ID generator in Hibernate?

Pro Content

36. What is Hibernate’s dirty checking mechanism?

Pro Content

37. What is the difference between get() and load()?

Pro Content

Integrations

38. How do you integrate Hibernate with Spring?

Pro Content

39. What are Hibernate's capabilities in a microservices architecture?

Pro Content

40. How do you use Hibernate with JPA?

Pro Content

Error Handling and Debugging

41. What are common exceptions in Hibernate?

Pro Content

42. How do you debug lazy initialization exceptions?

Pro Content

43. How do you resolve issues related to n+1 queries in Hibernate?

Pro Content

Testing

44. How do you test Hibernate applications?

Pro Content

45. What are in-memory databases, and how are they used in Hibernate testing?

Pro Content

46. How do you mock Hibernate Session objects?

Pro Content