dbTalk Databases Forums  

wb-2b1 database library for C, Java, and C#

comp.databases comp.databases


Discuss wb-2b1 database library for C, Java, and C# in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aubrey Jaffer
 
Posts: n/a

Default wb-2b1 database library for C, Java, and C# - 07-03-2010 , 12:32 AM






This message announces the availability of wb-2b1.

"WB" is a disk based (sorted) associative-array database package
providing C, SCM, Java, and C# libraries. These associative arrays
consist of variable length (0.B to 255.B) keys and values. Functions
are provided to:

* create, destroy, open and close disk-files and associative arrays;

* insert, delete, retrieve, find next, and find previous (with
respect to dictionary order of keys); and

* apply functions, delete, or modify values over a range of
consecutive key values.

WB is thread safe (so long as HAND structures are not shared between
threads). The `put' and `rem' operations allow associations to be
used for thread mutexs.

The WB implementation has a file size limit of 2^32 * block size
(default 2048.B) = 2^43 bytes (8796.GB). WB does its own memory and
disk management and maintains a RAM cache of recently used blocks.
Multiple associative arrays can reside in one disk file. Simultaneous
access to multiple disk files is supported.

The (database) disk files interoperate between the various language
platforms. The interface to the SCM Scheme implementation supports
longer data values and SLIB relational databases.

A structure checking and garbage collecting program and a block viewer
are provided.

WB is lightweight; compiled on x86_64 GNU/Linux, the wb-2b1 library
sizes are:

java/wb.jar 51 kB Java archive (zipped)
csharp/Wb.dll 63 kB PE for MS Windows (DLL) Mono/.Net assembly
c/libwb.so 81 kB ELF 64-bit LSB shared object, stripped
91 kB ELF 64-bit LSB shared object, not stripped
c/libwb.a 131 kB binary 64-bit library archive
c/wbscm.so 113 kB ELF 64-bit LSB shared object DLL for SCM, not stripped

WB is implemented using a variant of B-tree structure. B-trees give
slower access than hashing but are dynamic and provide an efficient
determination of successor and predecessor keys. All operations are
O(log(n)) in the size of the database. B-trees are commonly used by
database systems for implementing index structures. B-trees are
optimized for using the minimum number of disk operations for large data
structures. Prefix and suffix key compression are used for storage
efficiency in WB.

WB is free software and part of the GNU project. It is released under
the GNU Lesser General Public License (LGPL).

Documentation and distributions in several formats are linked from
WB's home page:

<http://people.csail.mit.edu/jaffer/WB>

Links to distributions of WB and related softwares are at the end of
this message.

-=-=-
wb-2b1 news:

wb-2b1 is a major revision. Details at
<http://cvs.savannah.gnu.org/viewvc/*checkout*/wb/wb/ChangeLog>

* "Clean" flag detects opening DB-file which was closed uncleanly.
* API calls now fail gracefully when passed a null han or seg argument.
* blkio rewrittent to improve robustness and error detection and reporting.
* Multiple calls to final and close procedures handled gracefully.
* Supports GNU configure.
* Makefile: Reorganized per <http://www.gnu.org/prep/standards/>.
* Added corner-case tests.
* C# port fixed; improved organization of C# source.
* "schlep" script renamed to "scm2c".

-=-=-

WB source is available from:
<http://groups.csail.mit.edu/mac/ftpdir/scm/wb-2b1.zip>
<http://groups.csail.mit.edu/mac/ftpdir/scm/wb-2b1-1.src.rpm>
Also available as binary RPMs:
<http://groups.csail.mit.edu/mac/ftpdir/scm/wb-2b1-1.i686.rpm>
<http://groups.csail.mit.edu/mac/ftpdir/scm/wb-2b1-1.x86_64.rpm>

WB comes with an interface to the Scheme implementation SCM; and
contains "wbtab.scm", SCM code allowing WB to implement SLIB
relational databases.

SCM source is available from:
<http://groups.csail.mit.edu/mac/ftpdir/scm/scm-5e7.zip>
<http://groups.csail.mit.edu/mac/ftpdir/scm/scm-5e7-1.src.rpm>
Also available as binary RPMs:
<http://groups.csail.mit.edu/mac/ftpdir/scm/scm-5e7-1.i686.rpm>
<http://groups.csail.mit.edu/mac/ftpdir/scm/scm-5e7-1.x86_64.rpm>
The i386 MS-Windows installer for SCM includes the WB Scheme API:
<http://groups.csail.mit.edu/mac/ftpdir/scm/scm-5e7-1.exe>

SLIB is a portable Scheme library which SCM uses:
<http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3b3.zip>
Also available as RPM:
<http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3b3-1.src.rpm>
<http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3b3-1.noarch.rpm>
Also available as MS-Windows installer:
<http://groups.csail.mit.edu/mac/ftpdir/scm/slib-3b3-1.exe>

Reply With Quote
  #2  
Old   
Jasen Betts
 
Posts: n/a

Default Re: wb-2b1 database library for C, Java, and C# - 07-03-2010 , 07:01 AM






On 2010-07-03, Aubrey Jaffer <agj (AT) alum (DOT) mit.edu> wrote:
Quote:
This message announces the availability of wb-2b1.

"WB" is a disk based (sorted) associative-array database package
providing C, SCM, Java, and C# libraries. These associative arrays
consist of variable length (0.B to 255.B) keys and values.
How is it better than Berkely db?
value size limit seems overly restrictive.

--- news://freenews.netfront.net/ - complaints: news (AT) netfront (DOT) net ---

Reply With Quote
  #3  
Old   
John Kelly
 
Posts: n/a

Default Re: wb-2b1 database library for C, Java, and C# - 07-03-2010 , 07:53 AM



On 3 Jul 2010 11:01:43 GMT, Jasen Betts <jasen (AT) xnet (DOT) co.nz> wrote:

Quote:
"WB" is a disk based (sorted) associative-array database package
providing C, SCM, Java, and C# libraries. These associative arrays
consist of variable length (0.B to 255.B) keys and values.

How is it better than Berkely db?
value size limit seems overly restrictive.

Well he said:

Quote:
WB is lightweight; compiled on x86_64 GNU/Linux, the wb-2b1 library
sizes are:

c/libwb.so 81 kB ELF 64-bit LSB shared object, stripped
91 kB ELF 64-bit LSB shared object, not stripped
c/libwb.a 131 kB binary 64-bit library archive

When I don't need bells and whistles, I prefer lightweight solutions.
They're easier to hack on and make changes, like increasing the value
size limit.


--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

Reply With Quote
  #4  
Old   
Tom Anderson
 
Posts: n/a

Default Re: wb-2b1 database library for C, Java, and C# - 07-04-2010 , 01:26 PM



On Sat, 3 Jul 2010, John Kelly wrote:

Quote:
On 3 Jul 2010 11:01:43 GMT, Jasen Betts <jasen (AT) xnet (DOT) co.nz> wrote:

"WB" is a disk based (sorted) associative-array database package
providing C, SCM, Java, and C# libraries. These associative arrays
consist of variable length (0.B to 255.B) keys and values.

How is it better than Berkely db? value size limit seems overly
restrictive.

Well he said:

WB is lightweight; compiled on x86_64 GNU/Linux, the wb-2b1 library
sizes are:

c/libwb.so 81 kB ELF 64-bit LSB shared object, stripped
91 kB ELF 64-bit LSB shared object, not stripped
c/libwb.a 131 kB binary 64-bit library archive

When I don't need bells and whistles, I prefer lightweight solutions.
True. FWIW:

-rwxr-xr-x 1 root root 1.4M 2010-04-02 16:18 /usr/local/lib/libtokyocabinet.so.9.6.0

Tokyo Cabinet, which one could consider the modern, fast, cool, BDB, is
about ten times the size in terms of code.

Quote:
They're easier to hack on and make changes, like increasing the value
size limit.
That particular example is a bit suspect, because by using a more
well-developed library, you wouldn't have a size limit in the first place.

tom

--
these are my testing supplies

Reply With Quote
  #5  
Old   
Aubrey Jaffer
 
Posts: n/a

Default Re: wb-2b1 database library for C, Java, and C# - 07-04-2010 , 10:14 PM



Jasen Betts <jasen (AT) xnet (DOT) co.nz> writes:

Quote:
On 2010-07-03, Aubrey Jaffer <agj (AT) alum (DOT) mit.edu> wrote:
This message announces the availability of wb-2b1.

How is it better than Berkely db?
It has O(1) next-key and O(log(N)) previous-key operations. WB provides
ISAM at the same interface level as the less flexible hash-table.

Quote:
value size limit seems overly restrictive.
The O(1) guarantee mentioned above cannot be made if key-lengths are
unbounded.

Reply With Quote
  #6  
Old   
Jasen Betts
 
Posts: n/a

Default Re: wb-2b1 database library for C, Java, and C# - 07-05-2010 , 06:47 AM



On 2010-07-05, Aubrey Jaffer <agj (AT) alum (DOT) mit.edu> wrote:
Quote:
Jasen Betts <jasen (AT) xnet (DOT) co.nz> writes:

On 2010-07-03, Aubrey Jaffer <agj (AT) alum (DOT) mit.edu> wrote:
This message announces the availability of wb-2b1.

How is it better than Berkely db?

It has O(1) next-key and O(log(N)) previous-key operations. WB provides
ISAM at the same interface level as the less flexible hash-table.
While hash indexing is the default, BDB(*1) also does Btree,if you want ordered
storage. (*2)

The next and previos operations on a tree feel like they are O(1); because
on a balanced binary tree the average(*3) number of steps between consecutive
keys is always less than 3 and O(3) is O(1)
As I understand it BDB does balanced N-ary trees N depending on record
and page size (ICBW N may be fixed - the usage documentation only hints
at the underlying mechanisms)

Quote:
value size limit seems overly restrictive.

The O(1) guarantee mentioned above cannot be made if key-lengths are
unbounded.
BDB allows changing the page size to allow longer values without
increased complexity. (else you can use the default and take degraded
performance when oversize records are encountered)

(*1) version 4.3 does anyway I have not looked at earlier versions.
(*2) and also two types of record-numbered list
(*3) the complexity of quicksort() is calculated on the average case too

--- news://freenews.netfront.net/ - complaints: news (AT) netfront (DOT) net ---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.