Database experiences in Python: Good or Bad?

Brad Clements bkc at Murkworks.com
Mon Aug 12 14:00:51 EDT 2002


"David Rushby" <woodsplitter at rocketmail.com> wrote in message
news:7876a8ea.0208120306.28a7b911 at posting.google.com...
> "Brad Clements" <bkc at Murkworks.com> wrote in message
news:<3d51193d$1_8 at goliath.newsgroups.com>...

>   Yes, there are.  Maybe it'll irritate me (or you, or some other
> crusader) enough to fix it one day.  My foremost free-time-priority
> right now is to round out kinterbasdb's feature set (to get it
> "squared away"--see this discussion:

My "free time" priority is Python on Windows CE, so I don't really have time
to spend fixing gds.

>   Last time I checked (about fifteen months ago, when I corresponded
> with you by e-mail), gvib released the GIL before most database API
> calls.  Have you since experimented with a '"one at a time" through a
> lock' approach?

No, but I put an extra thread.lock in gvib's DA.py module to block there,
and it has improved, but not solved the problem.

I've ended up getting extra database connections, some of them won't
commit() in Zope's transaction "machinery", so to the end user it looks like
their updates are okay, but when the server is restarted all their changes
are lost due to an implicit rollback by Interbase.

> > I'd consider switching if I could find another database that supports
> > transactions, same datatypes, good performance and low cost.
>
>   Doesn't SAPDB meet those criteria?  I don't know how you define
> "cost", and I haven't compared Firebird's performance to SAPDB's
> (aside from the obvious fact that SAPDB is vastly more demanding in
> the memory department, but also more SMP-scalable:

I am in the middle of "making the switch" to SAPDB.

What I've learned so far.

1. client is thread safe except when opening a connection, however the
Python sapdbapi.py module (DB-SIG 2.0 compliant) handles that with a lock.

2. SAP is big and complex

3. Lots of documentation, but not readily accessible.

4. Doesn't work on my Linux machine "out of the box", lacks "quick start"
instructions.

5. Picky.. it has caught some things that Interbase has let slide. Like

create table xyz (
   userid varchar(10) not null references  user(id) on delete set null
) ...

Interbase allowed that, but really that's nonsense.

So .. I still haven't tried it with Zope yet, hopefully later today

>   Well, upon searching the SAPDB mailing list archives for "Python
> thread safety", I found that you've apparently come to the same
> conclusions.  Should I smile or frown?

Two ways to look at it:

1. If SAP works for me, I'll drop Interbase/Firebird. So, maybe I can pass
maintenance of gvIB on to you?

2. If SAP works for me, and you eventually need scalability, maybe you'll
drop kinterbasdb and move to SAP?

;-)






-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



More information about the Python-list mailing list