Xref: utzoo comp.unix.questions:31598 comp.unix.wizards:25739 Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!newshub.ccs.yorku.ca!newshub.ccs.yorku.ca!oz From: oz@ursa.ccs.yorku.ca (Ozan Yigit) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: dbm docs? Message-ID: Date: 23 May 91 16:43:35 GMT References: <1991May18.203633.21387@dartvax.dartmouth.edu> Sender: news@newshub.ccs.yorku.ca (USENET News System) Organization: York U. Communications Research & Development Lines: 32 In-Reply-To: pete@othello.dartmouth.edu's message of 18 May 91 20: 36:33 GMT pete@othello.dartmouth.edu (Pete Schmitt) writes: I'm looking for any docs (beyond the man page) for dbm. The information I'm looking for is how the data is stored in both the .dir and .pag files and how they are used together internally. You can find out about the exact details of dbm/ndbm's page file format in the sdbm implementation, as sdbm uses the very same format of dbm/ndbm. Sdbm also comes with a few trivial utilities to work with the page files alone, ignoring the dir file. The dir file format is simple: it is an array of bits, and the algorithm to generate those bits is different for sdbm and ndbm. To put it simply, it is the split history of the page file, and any attempt to utilize it must have the same generation algorithm and the same hash function as the database library. Everything else you might want to know about dbm-style external hashing algorithms is detailed in [1], ftpable from nexus.yorku.ca under pub/oz as hash.ps.Z. If you need a very nice and fast hashing package with full dbm/ndbm capabilities, you should get the berkeley hash package, ftpable from postgres.berkeley.edu as bsd_db.tar.Z. This package includes a btree library as well. oz --- [1] Seltzer and Yigit, A New Hash Package for UNIX, Proceedings of the USENIX Technical Conference, Dallas, Texas. January 1991, 173-184 --- Not all good things come with three | internet: oz@nexus.yorku.ca pages of dogma and an attitude. - anon | uucp: utzoo/utai!yunexus!oz