KEMBAR78
Hibernate Interview Questions | PDF
0% found this document useful (0 votes)
9 views1 page

Hibernate Interview Questions

ORM (Object Relational Mapping) is a technique that connects Object Oriented programs to relational databases, primarily using JDBC API. JPA is a specification provided by Sun Microsystems, while Hibernate is an implementation of JPA that simplifies database interactions in Java applications. Hibernate features include being lightweight, fast performance with caching, database-independent queries, and automatic table creation, with mapping done through XML or annotations.

Uploaded by

gogulajayaram123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Hibernate Interview Questions

ORM (Object Relational Mapping) is a technique that connects Object Oriented programs to relational databases, primarily using JDBC API. JPA is a specification provided by Sun Microsystems, while Hibernate is an implementation of JPA that simplifies database interactions in Java applications. Hibernate features include being lightweight, fast performance with caching, database-independent queries, and automatic table creation, with mapping done through XML or annotations.

Uploaded by

gogulajayaram123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1) What is ORM ?

ORM stands for Object Relational Mapping. It is used technique to bridge between
Object Oriented programs to relational databases. It is manly for database
operation.
ORM internally uses JDBC API

2) What is Difference between JPA and Hibernate


JPA is Specification it given by sun microsystem ,It is part oracle. Hibernate
is JPA Implementation

3) What is Hibernate ?
Hibernate is light-weight, open-source, and simplifies the development java
applications to interact with databases. Hibernate is JPA Implementation .It helps
in mapping the Object Oriented programs to relational d atabases.

4) What is features of Hibernate ?


1) Light-Weight and Open-Source
2) Fast Performance :Hibernate supports cache mechanism
3) Database Independent Query : HQL generates the database independent queries.
You don't need to write database specific queries.
4) Automatic Table Creation

5) How will you map the columns of a DB table to the properties of a Java class in
Hibernate?
XML: We can map the column of a table to the property of a class in XML file.
Annotation: We can also use annotations @Entity and @Table to map a column to
the property of class.
6) What are the steps for creating a Session Factory in hibernate?
Configuration: First Creating a configuration object. This will refer to the path
of configuration file.
Resource: Add config file resource to configuration object.
Properties: Set properties in the Configuration object.
Session Factory : Use configuration object to build Session Factory.

7) Why do you use POJO in Hibernate?


POJO stands for plain old java Objects .A POJO is java bean with getter and
setter methods for each property of the bean. POJO also comes with a default
constructor that makes it easier to persist with a default constructor.

You might also like