41.What is many-to-many association?A Many-to-Many mapping can be implemented using a Set java collection that does not contain
any duplicate element.
42.Is SessionFactory a thread-safe object?Yes, SessionFactory is a thread-safe and can be accessed by multiple threads simultaneously. 43.What is the difference between save and persist methods of session object?session.save saves the object and returns the id of the instance whereas persist do not return anything after saving the instance. 44.What is the difference between get and load methods of session object?There are following differences between get and load methods. 45.What is lazy loading?Lazy loading is a technique in which objects are loaded on demand basis. Since Hibernate 3, lazy loading is by default, enabled so that child objects are not loaded when parent is loaded. 46.What is HQL?HQL stands for Hibernate Query Language. It takes java objects in the same way as SQL takes tables. HQL is a Object Oriented Query language and is database independent. 47.What is first level cache in hibernate?The first-level cache is the Session cache and is a mandatory cache through which all requests must pass. The Session object keeps an object under its own power before committing it to the database. 48.What is second level cache in hibernate?Second level cache is an optional cache and first-level cache will always be consulted before any attempt is made to locate an object in the second-level cache. The second-level cache can be configured on a per-class and per-collection basis and mainly responsible for caching objects across sessions. 49.What is Query level cache in hibernate?Hibernate also implements a cache for query resultsets that integrates closely with the secondlevel
cache. 50.What are concurrency strategies?A concurrency strategy is a mediator which responsible for storing items of data in the cache and
retrieving them from the cache. If you are going to enable a second-level cache, you will have to
decide, for each persistent class and collection, which cache concurrency strategy to use. 51.What is Next ?Further you can go through your past assignments you have done with the subject and make sure you are able to speak confidently on them. If you are fresher then interviewer does not expect you will answer very complex questions, rather you have to make your basics concepts very strong. Second it really doesn't matter much if you could not answer few questions but it matters that whatever you answered, you must have answered with confidence. So just feel confident during your interview. We at tutorialspoint wish you best luck to have a good interviewer and all the very best for your future endeavor. Cheers :-) 52.What does ORM consists of ?ORM solution consists of the followig four pieces: 53.What are the ORM levels ?The ORM levels are: 54.What is Hibernate?Hibernate is a pure Java object-relational mapping (ORM) and persistence framework that allows you to map plain old Java objects to relational database tables using (XML) configuration files.Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks. 55.Why do you need ORM tools like hibernate?The main advantage of ORM like hibernate is that it shields developers from messy SQL.
Apart from this, ORM provides following benefits: 56.What Does Hibernate Simplify?Hibernate simplifies: 57.What is the need for Hibernate xml mapping file?Hibernate mapping file tells Hibernate which tables and columns to use to load and store objects. Typical mapping file look as follows: 58.What are the most common methods of Hibernate configuration?The most common methods of Hibernate configuration are: 59.What are the important tags of hibernate.cfg.xml?Following are the important tags of hibernate.cfg.xml: 60.What are the Core interfaces are of Hibernate framework? People who read this, also read:- |