sqlite file format, anyone?

Matthew Vanecek mevanecek at yahoo.com
Mon Jun 23 22:44:02 CDT 2003


On Mon, 2003-06-23 at 21:02, Derek Atkins wrote:
> Christopher Browne <gnucash at cbbrowne.com> writes:
> 
> > A major  problem with creating some new "embedded DBMS" is that by the
> > time you get finished dealing with the concurrency challenges, you'll
> > probably have gone off and recreated an ad hoc, informally-specified,
> > bug-ridden slow implementation of about half of PostgreSQL.  And what is
> > even more unfortunate is that the resulting code will probably be
> > _bigger_ than PG...
> 
> I dont think so, because an embedded SQL database is meant for
> single-user access.  There is no concurrency challenge because there
> is nothing with which to be concurrent (except yourself).
> 

Additionally, in the multi-user environment, you should really check if
the data has changed before you update it.  If you SELECT it without
locking it, then the data could change during the time in which you
compare the retrieved row with the original and subsequently update it
(assuming retrieved == original).  The MVCC assures that all reads occur
against the latest committed data regardless of locks.  That's good. 
However, in our case, Gnucash may need to update several tables in a
single transaction (well, doesn't any well-designed DB app??). 
Theoretically, and event monitor thread could catch a NOTIFY, and
interrupt the UPDATE process, but you still need to check that the data
has not been updated by another process, prior to updating it yourself
(what if some enterprising DBA is in there mucking about?  No NOTIFYs
would be generated...).

Lastly, *nobody* is suggesting to use Postgresql as an embedded server. 
MySQL does have that advantage over PG--you call two tiny teeny little
functions in your app, and PRESTO! it's an embedded server app.  All the
other MySQL calls are coded just as if you're using a regular server.

-- 
Matthew Vanecek
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow except me.
I'm always getting in the way of something...



More information about the gnucash-devel mailing list