Possible Duplicate:
Why should you use an ORM?
Can someone provide a simple explanation to prove ORM is worth it?
EDIT
as for duplicate issue,I want the answer to be with some code demo to illustrate.
Possible Duplicate:
Why should you use an ORM?
Can someone provide a simple explanation to prove ORM is worth it?
EDIT
as for duplicate issue,I want the answer to be with some code demo to illustrate.
The biggest benefit for me, is that you don't need to deal with SQL string statements. If a new field is added, renamed, or removed, then you can see the lines of code that need to be modified. If you're using SQL strings, then you have to search through the code and manually find each instance of the line of code that needs to be updated. If you used to do database access via SQL strings, then you know how much of a PITA that is when the schema changes.
Since the field names and table names are in the code, you can see errors at compile time rather than have to build and deploy the app to test it against the database. So it makes testing and coding a lot easier/faster.
There are many benefits, just outlining a few:
All that is true, and if you are looking for one in Java - I should recommend Hibernate. Its cross-platform and you can integrated with ESB's and Java server pages.