Ultraband wrote:
Hello,
I'm using PHP's dba flatfile mode to maintain a flatfile database with a
few
records. It works good, but I was wondering about how it works. I notice
that after deleting a record, only what I take to be the key part of the
record is removed (the dba_* functions now longer read this record although
it remains in the flatfile), also when I update a record the key part of
the
record is removed, and another record is added with a new key.
Is this how the flatfile mode is supposed to work? Is there somewhere I can
find a little more on the inner-workings of this? It seems like it could be
relatively easy to debug if it became corrupted (as it is a textfile).
It's how some databases work - they don't update the record in place,
but delete & add the record at the end.
They mainly do that for MVCC reasons (ie different transactions possibly
see different records for varying reasons).
To work out how dba_* functions work in particular grab the php source
code and start reading ;)
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php