SQL, lite lite lite

Roger Binns rogerb at rogerbinns.com
Mon Dec 29 16:52:33 EST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aaron Brady wrote:
> Python.  There are some options, such as 'sqllite3', but they are not
> easy.  'sqllite3' statements are valid SQL expressions, which afford
> the entire power of SQL, but contrary to its name, it is not that
> 'lite'. 

Have you compared the compiled size of SQLite against other things?  For
example on my machine the size of MySQL client library, whose sole
purpose is to transport queries and results across the network is the
same size as the entirety of SQLite!  You can prune SQLite back even
further as documented in http://www.sqlite.org/compile.html

It is even possible to omit the SQL front end.  Queries are stored
already processed in the database.  This functionality is used by mp3
manufacturers and similar constrained embedded environments.

> To me, 'lite' is something you could learn (even make!) in an
> afternoon, 

If you just want to treat the database as a glorified spreadsheet then
SQL is "lite", although perhaps a little verbose of a dbm style interface.

> If you think SQL is
> a breeze, you probably won't find my idea exciting.  I assume that the
> basics of SQL are creating tables, selecting records, and updating
> records.

The basics of SQL are about expressing the relational model
http://en.wikipedia.org/wiki/Relational_model which has stood the test
of time.  (That doesn't mean it is superior just that it is good enough
like the "qwerty" keyboard layout.)  There have been attempts at
alternatives like http://en.wikipedia.org/wiki/The_Third_Manifesto but
that doesn't seem to have caught on.

It seems your basic complaint is the complexity of doing database stuff.
 Ultimately this will be the case if some data is related to other bits
of data.  As other posters have pointed out, there are various ORM type
wrappers for Python that try to wrap this up in syntactic sugar :-)

For something completely different have a look at CouchDB
http://couchdb.apache.org/ which operates on "documents" (basically
something with an id and an arbitrary updateable list of properties).
It does take a bit to get your head wrapped around it - try this posting
for an example http://www.cmlenz.net/archives/2007/10/couchdb-joins

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklZRp0ACgkQmOOfHg372QQ4RQCgzSmgEhvG2DQlWYb68U8BZNOo
wOAAnip4GIvKiskuwwWJwaepmJwHLjXJ
=0UiA
-----END PGP SIGNATURE-----




More information about the Python-list mailing list