JAVA -Hibernate - Easiest way to learn hibernate

What is Hibernate

An ORM and persistence framework.
Persistence means deals with storing or persist data in database.
ORM is Object relational mapping means relates object to the relational database table .


what  is does?

stores the plain java objects means POJO objects directly in database with the help of configuration files which are actually XML files.

why we need .... we already have JDBC and other stuff?
Because it makes developer's work more easier as he does not have to do all the persistence related work.


What are POJO by the way ?

POJO is plain old java object .
Its actually a java bean with getter and setter method of its properties and sometimes also contains some business logic for small purpose.


Second Level cache
Available to whole application not to particular application.
used to improve performance by reducing database round trips.
maintained at sessionfactory level.

Query cache
used to store result of sql query.
can be used with second level cache to improve performance.
e.g. EHCache

Sorted and ordered COllection

Sorted Collection are those which are sorted in jvM MEMORYafter the contents are fetched from database.

Cannot be used for large collections.
Ordered COllection are those which are sorted ata database level.
Can be used for large collections.







No comments:

Post a Comment

Do you like this blog