HIbernate Basics Help Documents
-------------------------------------------------
Features :
----------------
Open Source
ORM
Lazy loadiing
First level caching
Automatic Dirty checking
Second Level caching
Advantages
ORM : Object Relational Mapping
: Mapping object with particular table Uing the .hmb (Hibernate Mapping File) file. To load of objects into the particular rows and columns of the table.
: Also retrieve data from the table and load the data into the object instance or properties or objects member variables.
Lazy loading :
Fetching data from the database to the application. Unless you use that object in application its just a proxy. so when u will certainly going to use the object then it will retrieve the data.
Advantage :
better performance, does not execute unnecessary queries, lock time on the table is minimal, data accessing time is high.
First level cache:
If we want to retrieve an object representing a particular record of database having a primary key of 109 then first
it will look the framework whether is there any object with the same primary key ! if so then hibernate will give you
the reference of that particular object. so it will save the execution time and give better performance. it will not
execute unnecessary query to access the data from the database
Automatic dirty checking :
simply modify the collection using the normal collection methods. There is no explicit call to update() or save(); Hibernate automatically detects that the
collection has been modified and needs to be updated. This is called automatic dirty checking.
Second level caching :
Uses Physical memory to cache the particular object/table so faster retrieval of data being possible.
Flushing : The process of synchronizing the memory state with the database, usually only at the end of a unit of work, is called flushing.
Advantages :
Database in-dependency
Switching between database is easy
minimal time taking to switch the database
Need to change the Configuration file.
No specific syntax to follow.
No need of application server like weblogic, JBoss, EJB, Websphere etc.
Simple tomcat server is sufficient and efficient
Flexibility of collection pooling
No comments:
Post a Comment