Re: Include pysqlite2 into Python 2.5?

From: Alex Martelli (aleaxit_at_yahoo.com)
Date: 10/22/04


Date: Fri, 22 Oct 2004 00:33:34 +0200

Simon Brunning <simon.brunning@gmail.com> wrote:

> On Thu, 21 Oct 2004 10:13:56 +0200, Gerhard Haering <gh@ghaering.de> wrote:
>
> (snip)
>
> > I think that a simple embedded relational database would be a good
> > thing to have in Python by default. And as Python 2.5 won't happen
> > anytime soon, there's plenty of time for developing it, getting it
> > stable, and integrating it.
>
> I think it's a great idea.

Seconded.

> > One problem I see is that even the new PySQLite will grow and try to
> > wrap much of the SQLite API that are not directly related to the
> > DB-API. If such a thing is too complicated/big for the standard
> > library, then maybe it would be better to produce a much simpler
> > PySQLite, especially for the Python standard library that leaves all
> > the fancy stuff out. My codename would be "embsql".
>
> I think it's important that we realise that if Python ships with a
> default database engine, its API will rapidly become the de-facto
> standard, eclipsing the DB-API if it is different in any way.

Good point.

> Which is not to say that the current DB-API should be used. There have
> been discussions elsewhere about improving and simplifying the DB-API
> - providing iterators, getting rid of all but one of the parameter
> styles, that kind of thing. Perhaps the best thing would be to agree a
> DB-API version 3.0 over on the DB SIG, then make sure that the built
> in module supports that.

Amen, hallelujah.

> > So, what would you like to see? "import sqlite", "import embsql", or
> > "pypi.install('pysqlite')" ?
>
> I'd like to see a package into which you could plug different SQL
> database engines, with SQLLite as the default. So, you might do:
>
> from sql import sql
> sqllite = sql.Engine()
> my_database = sqllite.Database('c:/mydatabese.db', 'user_id', 'password')
>
> But you if you were using another engine, you'd only need to change this to:
>
> from sql import sql
> from other_engine import other_engine
> other_database = sql.Engine(other_engine)
> my_database = other_database.Database('c:/myotherdatabese.db',
> 'user_id', 'password')
>
> >From there on in, ideally you wouldn't have to change *anything*.

Young and idealistic, I assume. Care to name two more SQL engines
accepting exactly the same dialect as sqlite...?-)

Alex



Relevant Pages

  • Re: Restated: "Fields are expensive, records are cheap"
    ... same normalized design for any database engine. ... There is no such thing as "entire SQL language." ...
    (microsoft.public.access.tablesdbdesign)
  • Re: PostgreSQL
    ... In general any SQL database will handle all of those things better. ... This is VERY important ALWAYS make sure you have a PRIMARY key in each ... Having a sever database engine opens up a lot of options. ...
    (comp.lang.clarion)
  • Re: The future of SQL Server Express?
    ... database engines like SQL Express use up a LOT of memory and resources.. ... they are just designed as a trainer for people that are starting to use SQL ... I guess my hope would be that with the switch from MSDE to SSE, ... I'd think a local database engine would be an easier sell than ...
    (microsoft.public.dotnet.languages.vb)
  • Re: notification about DB changes
    ... What is your database engine? ... If you are using SQL 2000, have a look at the Notification Services: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Include pysqlite2 into Python 2.5?
    ... > thing to have in Python by default. ... default database engine, its API will rapidly become the de-facto ... Which is not to say that the current DB-API should be used. ... I'd like to see a package into which you could plug different SQL ...
    (comp.lang.python)