Python and Databases

Geraldo Lopes de souza precisa at uai.com.br
Mon May 19 17:22:12 EDT 2003


"Gerhard Häring" <gh at ghaering.de> escreveu na mensagem
news:3EC94490.3040109 at ghaering.de...
> Geraldo Lopes de souza wrote:
> > Hi,
> >
> >   From time to time I stop and try to do this, but I face one thing: The
> > lack of multi-database library. I think that this block many people from
> > making this change. If you're going to use just one database then ok,
but if
> > you want to use more than one, you have just one choice: the mxODBC
package.
> > It looks like a great package , it worths the price, but with java for
> > example, I get more much more ( in library terms) for less.
>
> Really? All you get with Java is the JDBC standard, with dozens of
> implementations (which is not entirely unlike things are done in
> Pythonia). Java's interfaces are of course stronger than the interfaces
> of Python (which in this case, is the DB-API specification).
>
You can use one of the dozen open-source OR mappers on top of JDBC. There
are good ones : Hibernate for example.

> >   I don't intend to attack or be rude with the commercial package , but
I
> > have seen many discussion of the acceptance of python to make business
> > applications.
> >  To increase this the python community needs a standard ODBC library in
the
> > language.
>
> I strongly disagree. An ODBC library (which Microsoft considers
> obsolete, btw.) has no place in the Python standard library, let alone
> the Python language. The best argument against is that there is
> practically nobody who'd be able to maintain such a beast (for free).
>
Microsoft can consider it obsolete, but can you name a database that don't
have a ODBC driver ?
I know that JDBC is a standard, but different from DB api, the database
makers also deliver JDBC drivers.

> >  You might say: Go for java. We are happy the way we are. For the answer
I
> > say, I like python more than java. When I get my hands in java I say :
This
> > would be a lot simpler if were done in python.
>
> You know you can access Java libraries using Jython? Jython is an
> alternative implementation of Python that runs under the Java Virtual
> Machine.
>
This is too much layers for me. I live in Brazil, and here machine power is
still a problem . (the tipical client in my work is a AMD K6)

> >   You might say: Why don't you develop such library ? I haven't enough
> > knowledge to do this, but I would test, a library like this. What I
(imho)
> > think the community needs, is an effort to make python to talk with
> > databases in an uniform way. I know there is the DB API but we need
ODBC.
> > ODBC is the standard way of communicating with databases, if you create
a
> > database the first thing you need is an odbc driver to make the existing
> > applications to talk with your database.
> >
> > What do you think, ? Please post your points.
>
> Ok, here's what I think Python needs. A standard library *on top of*
> DB-API modules that is higher-level and provides nice ways for
> integration with GUI and web frameworks. Something like ADO.NET.
>
> More later, if this thread will continue :)
>
> -- Gerhard
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>








More information about the Python-list mailing list