Before understanding Hibernate, let’s understand about ORM.

What is ORM ?

ORM stands for Object Relational Mapping

In any Java application, we will have objects which are representing the data that we store in the Database.

To store the data in the database, we need tables to be created in the DB and these tables are also called relational entities.

If we want to store these objects into database tables directly without writing any SQL, we need to map the class with the tables so that each object of that class can be mapped to each row in that table.

This kind of mapping between object and tables is called Object Relational Mapping(ORM).

So in ORM
class in java is referred to table in DB.
Instance of class also called objects referred to rows in the database table.
Each attribute in the class refers to each column in the table.

What is Hibernate?


Hibernate internally uses JDBC API to interact with the database

Hibernate is an open source and lightweight ORM and persistence framework which allows us to map plain old java objects to relational database tables.

It facilitates the storage and retrieval of java domain objects via Object Relational Mapping.

Hibernate is created by Gavin King

Hibernate is a lightweight or non-invasive framework because it does not force the programmers to extend any classes or to implement any interfaces.

Need for Hibernate?

Hibernate has come up with many benefits over JDBC which insists us to use it.

Let’s see those benefits in the below conversation between Teacher and a Student


Share this article on

Comment (9)

    1. Karibasappa G C (KB)
      Karibasappa G C (KB)

      First thing, static variables will never be a part of method, it will be a part of class always.

      So only we cant declare any static variables inside a method but we can access them inside a method.

      All static variables will be stored in separate segment inside Heap area only.

      1. The blog is very helpful. Thanks a lot for sharing! Also the “Inheritance in interface” page is not opening. Can you please fix that?

Leave a Comment

  • You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" extra="">

    • Please answer this simple challenge to post your valuable comment *