Karthikeyan
07-05-2005, 12:03 AM
What is the difference between a Object Relation Mapping ( OR/M ) tool like hibernate , and the data mapper tool like iBatis. And in which scenario we must go for those tools.
Thanx
Thanx
|
Click to See Complete Forum and Search --> : OR/M tool and Data Mapper Karthikeyan 07-05-2005, 12:03 AM What is the difference between a Object Relation Mapping ( OR/M ) tool like hibernate , and the data mapper tool like iBatis. And in which scenario we must go for those tools. Thanx Oak 07-05-2005, 06:10 AM Thats a good question. All I can find about it is this from the ibatis FAQ: SQL Maps is a persistence solution that allows you to easily map SQL to java objects. It is NOT an object-relational mapping tool, but can be used to map tables to objects using SQL. I had a quick look at hibernate before deciding to learn Ibatis and found it much more complex. You will be amazed at the power and simplicity that Ibatis offers! If you find a conclusive answer to the difference between these two then be sure to post it :) All the best! Karthikeyan 07-06-2005, 03:30 AM DATA MAPPER The Data Mapper is "a layer of mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself" . It moves the responsibility of persistence out of the domain object, and generally uses an identity map to maintain the relationship between the domain objects and the database. In addition, it often (and Hibernate does) use a Unit of Work (Session) to keep track of objects which are changed and make sure they persist correctly. ORM Tools Object Relational Mapping (ORM) Tools provide a slick way of persisting objects (data) to a database. ORM tools are not for detailed oriented programmers that have to know all the internels of how things work. A good ORM implementation should be black-boxed so that once you understand what they provide you with you should not care so much how it works...only that it does. Oak 07-06-2005, 09:23 PM I found this also ;) : Under these circumstances, another good choice would be an Object/Relational Mapping tool (OR/M tool), like NHibernate. Other products in this category are Apache ObjectRelationalBridge and Gentle.NET. An OR/M tool generates all or most of the SQL for you, either beforehand or at runtime. These products are called OR/M tools because they try to map an object graph to a relational schema. iBATIS is not an OR/M tool. iBATIS helps you map objects to stored procedures or SQL statements. The underlying schema is irrelevant. An OR/M tool is great if you can map your objects to tables. But they are not so great if your objects are stored as a relational view rather than as a table. If you can write a statement or procedure that exposes the columns for your object, regardless of how they are stored, iBATIS can do the rest. I now understand the difference. All the best :) Karthikeyan 07-07-2005, 12:25 AM Thats Fine :) Cheers webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |