ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Jenkins <krisajenk...@yahoo.co.uk>
Subject Re: A few dumb questions
Date Mon, 29 Nov 2004 18:05:39 GMT
Oliver Zeigermann wrote:

>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?
Quoth the website: "Works with any database that has a JDBC driver (no 
plugins required)"

Personally, I've used it with Oracle & Postgres in production, and MySql 
privately, with absolutely no problems.

>2) how ibatis compares to OBJ (http://db.apache.org/ojb) or hibernate?
>What would be reasons for ibatis?
I'm always in danger of starting a war on this topic, so forgive me if I 
rant.  However...

The thing I like about SqlMap (that I vehemently dislike about most 
alternatives) is that it doesn't get in my way.  It gives me full 
unfettered access to the SQL that fetches my data.  So I know that if I 
can construct the SQL query, SqlMap can handle it.  Just as important, I 
know that if I /optimise/ that query, SqlMap won't assume it knows better.

My short and bitter experience tells me that many OR solutions assume 
they know SQL better than I do, that they know my database flavour 
better than I do, and that they know my database schema better than I 
do[1].  There are times, and projects, when these 3 things are true.  
When they are, the SQL-hiding tools are doubtless faster and easier.  
When those assumptions break down, it's time to reach for SqlMap.

fn1. They don't, they don't, and they don't.  Not because I'm any sort 
of guru, but because it involves the kind of expert knowledge that 
humans are very good at and computers take years of programming and 
maintenance to match.

>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

SqlMap doesn't do any 'dirtiness' checking on objects.  It won't know to 
only persist child[3], for example.  That falls on the programmer I'm 
There are configurable caching options on queries though, and it's worth 
checking the documentation for what they can (and can't) provide.


Kris Jenkins
Email:  kris@jenkster.com
Blog:   http://cafe.jenkster.com/
Wiki:   http://wiki.jenkster.com/

View raw message