Introduction
to ORM
- Object-oriented programming technologies are typically used to implement business logic.
- Object-oriented technology supports the building of applications out of networks of objects with both data and behavior.
- Relational databases are used for persistent data storage
- Relational technology supports the storage of data in tables and manipulation of that data using data manipulation language (DML)
- Impedance mismatch between the two paradigms: objects vs. relations
- ORM toolkits are designed to address this impedance mismatch
Important
aspects of ORM toolkits
Mapping
specification
Class
inheritance
Query
language
Persistence
Fetch
strategies
Caching
ORM Solutions
Hibernate
– Open Source
iBatis
SQL Maps – Open Source
TopLink
– Commercial
JPA – Java EE 5 Solution
Nhibernate
(.NET environment (C#))
Overview
of Hibernate
Started
in 2001 by Gavin King as an alternative
to using EJB2-style entity beans
Open Source
light-weight ORM solution
Doesn’t
require container (light-weight)
Object
based model
It is
around from quite some time
Very well
matured and adopted by a large
developer
community
Maintained
by a team at JBoss (Redhat)
led by Steve Ebersole
Latest
Version 4.x
Why
Hibernate?
Hibernate
was introduced to address the issues of
Entity Beans
Hibernate
is built on top of JNDI, JDBC, JTA
It uses
XML based configuration files for mapping
Supports
many databases like Sybase, Oracle,
MySQL,other Object
Oriented Databases etc.
Easy migration
from one vendor database to another
Hibernate
generates the JDBC Code based on the underlying vendor database
Hibernate
APIs are very simple to learn and use
Provides
quite powerful object query language
known as Hibernate Query
Language (HQL)
Hibernate Architecture
No comments:
Post a Comment