Is it just me, or is Sqlite3 goofy?

mensanator at aol.com mensanator at aol.com
Mon Sep 11 21:23:50 EDT 2006


Mike Owens wrote:
> On 9/11/06, Steve Holden <steve at holdenweb.com> wrote:
>
> > Sure. But if you go back to the start of the thread you'll remember the
> > OP was originally complaining that SQLite was being promoted in the
> > Python docs as SQL compliant.
>
> Define "SQL compliant." That's about as technically precise as saying
> that something tastes like chicken.

Can you run your car on diesel fuel?

Why not?

Because your car's specification says to use gasoline?

If your car has been designed to run on diesel, you shouldn't
be saying it has gasoline engine. Duh.

>
> Furthermore, I'm not responding to Python's representation of one
> thing or another. I am responding to some of the ridiculous and unfair
> criticisms directed at SQLite. Whatever Python did or didn't do, or
> whatever PySQLite does or doesn't do, SQLite doesn't deserve to be
> drug through the mud.

Sure it does.

>From SQLite Homepage
  documentation
    Available Documentation
      Distinctive Features

<quote *emphasis added*>
This page highlights some of the characteristics of SQLite
that are unusual and which make SQLite different from many
other SQL database engines.

Manifest typing

Most SQL database engines use static typing. A datatype is
associated with each column in a table and only values of
that particular datatype are allowed to be stored in that
column. SQLite relaxes this restriction by using manifest
typing.

In manifest typing, the datatype is a property of the
value itself, not of the column in which the value is
stored. SQLite thus allows the user to store any value
of any datatype into any column regardless of the declared
type of that column. (There are some exceptions to this
rule: An INTEGER PRIMARY KEY column may only store
integers. And SQLite attempts to coerce values into the
declared datatype of the column when it can.)

***********************************************************
* The SQL language specification calls for static typing. *
***********************************************************

So some people feel that the use of manifest typing is a
bug in SQLite. But the authors of SQLite feel very
strongly that this is a feature.

**********************************************************
* The authors argue that static typing is a bug in the   *
* SQL specification that SQLite has fixed in a backwards *
* compatible way.                                        *
**********************************************************
</quote>

A spcification cannot be a bug (unless it is inconsistent
with other specifications). An implementation can be,
but a specification cannot.

>
> > You shouldn't need to
> > add check constraints to verify that the value stored in an integer
> > column is actually an integer.
>
> You should if your using SQLite, and this is clearly documented:
> http://www.sqlite.org/datatype3.html.
>
> > I don't think anyone is trying to suggest that SQLite isn't a prefectly
> > good tool for many purposes: it's far more sophisticated than bsddb, for
> > example, and I've used both it and Gadfly (which has similar
> > deficiencies when compared to strict standards) with complete satisfaction.
>
> Then what does calling it crappy and goofy suggest?

It suggests that the SQLite author is a crackpot.




More information about the Python-list mailing list