Re: pysqlite design decisions

Roger Binns <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

glyph-TyWPi3/[email protected] wrote:
|  >In that case I will provide the option for the Connection to close all
|  >the cursors :-)
|
| Great.  Having 'commit()' mean 'commit ... some time in the future,
| depending on what other method I call' is just nasty.

BTW apsw doesn't have a commit method.  You call
cursor.execute("COMMIT").  Another benefit of ignoring DBAPI :-)

| There is _always_ more to do.  For example, the website suggests that
| SQLite is inappropriate for usage on servers.  I disagree - I've found
| SQLite to be a _great_ server-side database.

It isn't meant in the way you think.  SQLite doesn't have a network
interface so putting it on a server won't do you any good (ie
inappropriate).  MySQL, Postgres, Oracle etc all have the network as
their expected mode of operation.

Additionally even if you have your own custom network front end, the
default settings in SQLite are inappropriate for server side work.  For
example SQLite defaults to a 2MB cache.  A server should use large
amounts of ram for a cache.

So out of the box, SQLite is not a good choice for servers.  Can you
make it work on a server? Yes, you can make it work well if you
understand the data, the workload, the clients, the tuning etc.  Oh,
you'll have to roll your own networking, authentication, logging etc
which you get as standard from the other databases.

| Some trivial googling reveals this:
|
|    http://stuartbishop.net/Software/DBAPI20TestSuite/

It looks ok, but hasn't been modified since 2003.  Most of the testing
is verifying requisite attributes are present and that methods return
errors when they should, as well as transaction isolation.  It does
require some adapter code being written per database and the example
even overrides some methods they don't comply with so they don't get
tested!  Perhaps most useful would be the people who use databases to
maintain the test suite and add in tests based on real world experience.

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

iD8DBQFFeRYYmOOfHg372QQRAr8rAKC+HDh6FHAI12uuS461iQWILdxGTACg0W1m
DXvdMFcP7NqaYcnENSQPevM=
=Esy3
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.