Technical Jargon

"Its fun to learn"- guru_G

An introduction to Hibernate

 

hey guys,
am gonna talk abt Hibernate..!!! its an ORM tool…
wats ORM and wats an ORM tool..?? ORM stands for Object Relational Mapping..its mapping between objects and database. we normally use JDBC to  talk 2 database from Java. Using an ORM tool like Hibernate we map java objetcs to Database. In Hibernate tables are denoted as classes and relationships are denoted by objects. there are a few terms we need to understand when we are using Hibernate.
POJO Classes- Plain Old Java Objects
These are java equivalent of the database tables, the columns in the tables are represented as member variables of the particular class with access specifer Private..all these member variables willl have getter and setter methods. The class also consists of a default constructor .We normaly add two parametrised constructors. one consisting of all the members in the class another consisting of member variables which are mandatory(ie: columns which are NOT-NULL in table).
HBM- Hibernate Mapping File
this is an xml file defining the table structure.
 

Hey all, I am gonna talk abt Hibernate..!!! Its a java persistence frame work. In simple words its  an ORM tool.

Whats ORM and whats an ORM tool..?? ORM stands for Object Relational Mapping..its mapping between objects and database. we normally use JDBC to  talk 2 database from Java. Using an ORM tool like Hibernate we map java objetcs to Database. In Hibernate tables are denoted as classes and relationships are denoted by objects. there are a few terms we need to understand when we are using Hibernate.

  • POJO Classes- Plain Old Java Objects

These are java equivalent of the database tables, the columns in the tables are represented as member variables of the particular class with access specifer Private..all these member variables willl have getter and setter methods. The class also consists of a default constructor .We normaly add two parametrised constructors. one consisting of all the members in the class another consisting of member variables which are mandatory(ie: columns which are NOT-NULL in table).

  • HBM- Hibernate Mapping File

An xml file defining the table structure.using the various tags available, we can define the entire schema.

  • Hibernate CFG -configuration file 

Using the Configuration file we can specify the dilaect, the schema to which we need to connect, the driver to be used, the connection pool size etc etc.

May 23, 2009 Posted by | Introduction | , , | 1 Comment

   

Follow

Get every new post delivered to your Inbox.