Hibernate - Interview Questions and Answers for 'Accenture' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Hibernate - Interview Questions and Answers for 'Accenture' - 5 question(s) found - Order By Newest

Frequently asked question in companies using Hibernate.
  Q1. What is Lazy Initialization in Hibernate ?Hibernate
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded.

  Sample Code for Lazy Initialization

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate   lazy loading hibernate   lazy initialization hibernate   architecture     Asked in 77 Companies      Basic        frequent

Try 2 Question(s) Test


 Q2. What are different types of second level cache ?Hibernate
Ans. 1. EHCache ( Easy Hibernate )
2. OSCache ( Open Symphony )
3. Swarm Cache ( JBoss )
4. Tree Cache ( JBoss )

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate   orm   hibernate cache   technical lead     Asked in 7 Companies


 Q3. What is Criteria in Hibernate ?Hibernate
Ans. Criteria is a simplified API for retrieving entities by composing Criterion objects.

For example - session.createCriteria(Employee.class).add( Restrictions.like("name", "A%") ).list();

will return all employee objects having name starting with A.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate   hibernate criteria     Asked in 7 Companies      Basic        Frequent

Try 1 Question(s) Test


 Q4. Difference between JDBC and Hibernate ?Database
Ans. JDBC is a standard Java Api for Database communication whereas Hibernate is an ORM framework that uses JDBC to connect with Database.

Hibernate is another layer of object table mapping over JDBC that provide a database independent, object oriented and an efficient way of database communication.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     JDBC  Hibernate  JDBC vs Hibernate     Asked in 3 Companies


 Q5. Explain different inheritance mapping strategies with JPA / Hibernate.Hibernate
Ans. table per hierarchy
table per concrete class
table per sub class

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hibernate mapping  hibernate associations     Asked in 4 Companies



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: