Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Main difference between Save and Saveorupdate in hibernate?

Answer»

Main difference between Save and SAVEORUPDATE in hibernate?
(1)Save():-In Hibernate this METHODS is basically used to store an object in the DATABASE. And it only INSERT the record if it is not there if yes then it will do NOTHING.
(2)Saveorupdate():-In Hibernate this method is used to update the object using identifier. If identifier is missing then methods calls is save() other wise it will do the update method.

2.

Name the types of inheritance in Hibernate

Answer»

Below are the three types of INHERITANCE in hibernate-
a)Table PER CLASS
b)Table per subclass
c)Table per concrete class

3.

File extension for hibernate mapping file and configuration file?

Answer»

File EXTENSION for hibernate mapping file and CONFIGURATION file?
NAME of the file of hibernate mapping file is
(1)filename.hbm.xml
And Name of hibernate configuration file is
(2)hibernate.cfg.xml

4.

Which is the most common methods of Hibernate configuration is

Answer»

Which is the most common METHODS of HIBERNATE CONFIGURATION is
Most common methods of Hibernate configuration is XML configuration in hibernate.cfg.ml

5.

What are different types of object mapping

Answer»

Below are the three types of object mapping-
a)Light object mapping-In this mapping Entities are represented as classes that are mapped manually to the relational tables
b)MEDIUM object mapping-In this mapping Application is DESIGNED around an object model and Associations between object are supported by the persistence mechanism. SQL is generated using code generation or at runtime by framework code.
c)Full object mapping-In this mapping sophisticated object modelling LIKE composition, inheritance, polymorphism is USED.