Is it just me, or is Sqlite3 goofy?
Steve Holden
steve at holdenweb.com
Mon Sep 11 17:56:31 EDT 2006
Mike Owens wrote:
> I coworker pointed me to this thread.
>
>
>>>>and why it isn't SQL.
>
>
>>>It isn't SQL simply because SQL won't let you insert text
>>>into a numeric field.
>
>
>>Yup, I have to agree that's pretty crappy. (Makes mental note to limit
>>use of SQLite).
>
>
> Ever heard of check constraints? That's another feature of this
> crappy, non-SQL database. They are one of at least three different
> approaches you can take to implement strict typing using SQLite's SQL
> and C library facilities.
>
Oh, right. So you're trying to defend SQLite (which, by the way, doesn't
need it: it's a perfectly fine tool for limited purposes) by suggesting
that column typing's failure to work isn't a problem because you can
declare column types in check constraints? That seems like a hard
position to defend to me.
You might as well say it's OK to sell blunt knives because they can
always be sharpened.
[examples snipped]
>
> That darned dynamic typing. It works like almost any other database if
> you want it to. (Makes mental note to spend more time reading SQLite
> documentation before bashing SQLite.)
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. It clearly isn't if its response to the
insertion of a data value that conflicts with the declared column type
is to store a value whose type is something else. You shouldn't need to
add check constraints to verify that the value stored in an integer
column is actually an integer.
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.
So climb down off that high horse :-)
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list