note
ioannis
Previous replies focused on ACID properties, with this post
I observe other kinds of differences:<p>
<b> Advantages of Perl Hash:</b>
<ul>
<li> Easy to store a structure as value
<li> Easy to later add more hashes (databases) , but
in db4 you commit on it ahead of time.
<li> Easier to store multiple values for a key (arrayref)
<li> No need to worry about recovery and proper shutdown
</ul>
<p>
<b> Advantages of BerkelyDB (not the same as DB_File):</b>
<ul>
<li> Easier to access values bases on combination of keys and values
<li> Can to construct cursors (iterators)
<li> Can construct custom indexes (not yet supported in the DB4 Perl api)
<li> The first 4k of data are in memory, the rest on disk
<li> Can add callbacks to modify the standard access and retrieval methods.
</ul>
<p>
Comparisons with SQL databases miss the whole point of
an embedded database. DB4 is not a multi-process system;
it is an embedded database, a a C library intended meant to run in
the same address space with the main program (when not using rpc).
The general advantages and disadvantages of stand-alone models versus
the client-server model should be noted.
548147
548147