commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [DBUtils] Introduction and some thoughts
Date Fri, 15 Nov 2002 12:40:28 GMT
From: "Henri Yandell" <>
> Nope. Looks good, Apache licence too so it's usable. Why am I not
> surprised that Strachan is on it :) He gets everywhere. My rule of thumb
> is becoming: "it's not an open source Java project if Strachan's not on
> it. " [Damn, hurry up and join DbUtils James].


> I'll try to learn more about it so that DbUtils doesn't grow in that
> direction, which a couple of Mike's suggestions concering the ColumnData
> might be getting towards (?).
> Assuming you're the Travis who's heading up, what do you
> think? Is DbUtils redundant? Can you see a clear separation of concern?
> Are there any things you think would go well there.
> The reason why I think there's not a cross-pupose:
> I'm not an amazing Db coder or anything, I do bits etc. When I look around
> at all the libraries to help me with DBs, they all involve me having to
> get religious about them, OO-db's, ObjectBridge, Castor/JDO, CrossDB[I
> think]. I like getting religious about things, but it's expensive to do
> properly [in time], so when I haven't got that time I like to just make
> the boring old religion that little bit easier.
> One of the issues I believe DbUtils has to watch for is introducing any
> religion. So, if someone _has_ to use a framework to get the power, then
> we're starting to compete with the other projects and not fitting the
> currently empty niche. Idea is just to make JDBC(tm) easier.
> Currently I'm wrestling with a DbPoller. It's a simple piece of code which
> polls the db to notify something when that table changes. Issues being:
> 1) I introduce a PKey class to hold a column-data info. Basically akin to
> Mike's suggestion. Is this a framework yet?

FWIW commons-sql already has a bean model to represent Database, Table,
Column, Indices and so forth that can be turned into XML and back again and
reverse engineered from a JDBC connection.

Also it contains a little DynaSql class for working with DynaBeans and JDBC.
So you can (using beanutils) turn SQL results sets into DynaBeans, do
insert/updates via DynaBeans etc.

> 2) DB-specific. Oracle has some irritating bugs with jdbc and I extend
> DbPoller to get OracleDbPoller. This provides some issues for building,
> but I'm sure they can easily be fixed. More importantly, should DbUtils
> fill up with lots of DB-specific extensions [or in a side repository
> anyway].
> Another idea is GUID/Sequencers. Would be nice to have a Sequencer
> interface and then I make an OracleSequencer which uses a select on
> nextval etc, or a MySql sequencer with last_insert_id. Issues being, how
> do I enforce the last transaction there? There'd also be java-level
> random-number Sequencers, which would use the sequence-id code from
> Patterns sandbox, or other ideas.
> Is this getting towards a framework?

I do think its hard trying to create reusable JDBC code - since there's many
different ways to use JDBC there's the danger of writing code thats not


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message