ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Laflamme" <philippe.lafla...@mail.mcgill.ca>
Subject RE: A few dumb questions
Date Mon, 29 Nov 2004 18:30:26 GMT
Clinton and folks will probably give you a more correct answer, but here's
mine in the meantime.

1) iBatis Java uses the JDBC API to access databases. In other words, any
database that has a JDBC driver should be compatible. Concerning the SQL
itself, since the programmer is responsible for building/managing the SQL,
it is then your job to make it compatible with whatever database you're
dealing with. Personally, I work with iBatis on MySQL and I've heard others
speak of Oracle, PostgreSQL and also DB2.

2) It is difficult to compare iBatis to these tools. Let me clarify what
iBatis is not: it is NOT an Object/Relational Mapping (ORM) tool nor is it a
persistence engine. In other words, it does not map Objects to Relational DB
tables. You can use iBatis to accomplish ORM or persistence, but it is not
its goal. Hence comparing it to these tools would not be of great value.

iBatis is a "SQL Result mapping" framework. It helps you dynamically build
complex SQL statements using objects as input and allows you to "map" the
result back into complex object models. SQL statements are built using an
XML format, similar to JSP tags.

3) Since iBatis is not a persistence engine, it is your responsibility to
manage queries that create/update rows in a database. There is no answer to
your question as it depends on your implementation. It is up to you to
determine what your priorities are and implement them using the framework. 

iBatis SQLMaps has no restrictions about how you should use it. It simply
creates SQL statements from objects and maps SQL results to objects. In
other words, you can build your own ORM solution that fits you particular
needs if that is what you require.

As an example, my use of the iBatis framework allows me to have a single
statement that can update a single row or multiple rows in a table based on
the state of the object being updated. By looking at the state of the
object, the resulting SQL UPDATE statement can modify many columns or a
single one. Also, using the same paradigm, I'm able to build complex queries
that "JOIN" on different tables depending on the object that describes a
search criteria. The same SQL Map could JOIN on any number of tables
depending on its input object.

Hope this helps,
Philippe Laflamme

-----Original Message-----
From: Oliver Zeigermann [mailto:oliver.zeigermann@gmail.com] 
Sent: Monday, November 29, 2004 12:21 PM
To: ibatis-user-java@incubator.apache.org
Subject: A few dumb questions


I am considering to use ibatis as a database mapping tool for Jakarta Slide
and am wondering if anyone can tell me

1) which databases are known to work with ibatis? Really all known ones? Or
this there an explicite list?
2) how ibatis compares to OBJ (http://db.apache.org/ojb) or hibernate? What
would be reasons for ibatis?
3) if I store back a huge object which is only partly changed, how does
ibatis know which data to store back? Does it compare the object to
anything? Is caching involved in this? Or does it store back everything?

Would be great if anyone had any hints!

Cheers and thanks in advance,


View raw message