![]()
DBH: DBH is a library to create Disk Based Hashtables on POSIX systems.
![]()
What's a disk based hashtable? A DBH is a convenient way to associate keys composed by characters to data records. Any kind of digital information can go into the data record, such as text, graphic information, database structures, you name it. The idea behind using a DBH is to get rid of what is known as an index file in the database world. In the DBH world, the index is built into the file format.
What's wrong with using GhashTables? Nothing, absolutely. But GhashTables (from the GNU glib library) works fine for hashtables that reside in memory, not disk. There is a size limitation in this respect to GhashTables. But the combination of GhashTables and DBhashTables is a powerfull thing indeed.
Why should I use DBH? If you need to have large quantities of information available online, and with obsolete equipment you require better performance than that available with expensive proprietary databases, then DBH is for you.
When should I not use DBH? If you wish to use a large database problem as a means to justify the purchase of expensive state of the art hardware and proprietary software, stay clear of DBH. Don't even mention it.
Does
it work? Of course it
does.
You can find an example at http://supermapa.com.mx/.
This is the new location of Supermapa Internet, www.supermapa.com, www.supermapa.com.mx, supermapa.com, supermapa.com.mx and other now defunct names.
Este es el nuevo sitio de Supermapa Internet, www.supermapa.com, www.supermapa.com.mx, supermapa.com, supermapa.com.mx y otros nombres ya inexistentes.
How does it work? DBH extends the concept of binary trees into a n-tuple dimensional space. This way the trees it creates are much more like the trees we actually see in nature, and nature is a wise thing.
On what platforms does it run? Linux, FreeBSD, AIX, Solaris, SunOS, Digital Unix, Irix, and in general any POSIX compliant OS. You can even make it work on win98, winME, and winNT4 with the free-commandline compiler from Borland.com (at present the bcc makefile is not included in distribution).
How does DBH guarantee the growth of a balanced tree? This is done using some concepts borrowed from mathematics. The first one is the concept of natural numbers, {1, 2, 3, ...}. Natural numbers is how we count, and there are infinite, countable and have a certain order. But we must not think that they are the only representation. Any other set which is countable, infinite and has a certain order is the exact same thing, even though they may seem strange or weird. Well constructed DBH tables make use of cuantified numbers, which are a different way of expressing the natural numbers, with a different ordering rule. Assuming that the computation bottleneck is the transfer of data from memory to CPU registers, cuantified numbers is the way index records to guarantee the fastest possible retreival speed. More technical information on cuantified numbers can be found soon to be published article on the subject.
How do I use it? Documentation on function calls can be found here http://dbh.sourceforge.net/doc/. To use the library, after dbh is installed, put a: #include <dbh.h> header in your code, and then do a link with -ldbh -lm. Both static and dynamic libraries are available.
Where do I get it? Download your arch.rpm, .src.rpm or tar.gz from here.
Is there any support? There is a mailing list is at: dbh-users@lists.sourceforge.net, and you can find information on how to subscribe or send messages by visiting the link http://lists.sourceforge.net/mailman/listinfo/dbh-users.
What about SQL with DBH? Don't hold your breath. Nowadays SQL is used by system programmers, not end users, which defeats the very purpose of SQL. Most end users are accessing databases through web browsers. It is much easier to click buttons than to compose a SQLish command line. And any system programmer to be respected knows her a, b, C, so that DBH is easier to program than SQL controlled databases.
Who is the author? Edscott Wilson García, who can be reached at <edscott at users dot sourceforge dot net>.