Hi
your question is basic one. and of course drive behind creation of Hibernate. It gives Object-Oriented sense to database layer. So that you design your application along with database objects in uniform way.
Previous it was like Object oriented way and then use sql injections to fire the query or in another way. but still we rely on JDBC to work on data.
In ORM, you work on objects in similar way and perform db operations without compromising DB rule or OOPS concepts.
Object persistence is to persist object onto storage. Common storage is DB. So to store an object, you store in session given by ORM, ORM session does everything for you. So it looks like object getting stored onto storage area.
Java is most popular OOPS language. It's popularity lies in it's implementation of OOPS concepts. Although it allows some overhead to perform some operations, but it does't compromise with concepts. That's why you will see java running very slow or taking too much memory, but doesn't allow non-OOPS.
BTW there are Hibernate flavors for non-java platforms.
|