[DB-SIG] Re: DB-API wrapper with db_rows
jacobs at penguin.theopalgroup.com
Sat Jan 3 09:14:29 EST 2004
On Sat, 3 Jan 2004, Jon Franz wrote:
> >From reading this list, I discovered Kevin Jacob's db_row which I took
> >Does anyone know if I have duplicated someone elses effort (Not that
> >there is much effort on my part)? I haven't yet posted my code, but if
> >you would like a copy, just email me.
> Well, it overlaps with PDO, including the version we're just now
> testing (which has input functionality - though in PDO land its an
> 'EditableResultSet' and allows for editing of existing records).
Great! Variety and choice are good. Just remember, db_row solves a
fundamentally different (and simpler) problem than PDO and has completely
different design trade-offs. Specifically:
1) db_rows must act very much like tuples and dicts, for backward
compatibility with DB-API conforming apps and drivers.
2) db_rows must allow field access by index, by item, and by attribute
3) db_rows must be light-weight and fast. E.g., a result set of 200,000
result tuples may take 13MB of memory, the same result as a list of
dictionaries takes about 117MB of memory, while a list of db_rows takes
just over 14MB of memory. Performance (using the optional C extension)
is very competitive with tuples and much better than dicts.
> Take a look at PDO - you're welcome to join the project if this sort
> of thing interests you. If you don't like it, you can always just keep
> working on your own. No harm, no foul either way.
Thanks, but I'm not much of a fan of ADO-style interfaces. However, I have
looked at a few versions of PDO and think it is great for those that are.
We have a long way to go before the current generation of interfaces mature
to the point where there will be natural convergence. Until then the key is
for the various implementers to keep an open mind, track what is happening
with other projects, and share ideas so that we're not stuck continually
re-inventing the same wheels.
The OPAL Group - Enterprise Systems Architect
Voice: (440) 871-6725 x 19 E-mail: jacobs at theopalgroup.com
Fax: (440) 871-6722 WWW: http://www.theopalgroup.com/
More information about the DB-SIG