Paul Raulerson writes:
> Pretty much the last time I tried to use it for anything serious was in Solaris 7, 
>but yes, I am thinking of what was delivered with
> BSD 4.1 and above.  So you are saying the -ldb will give me multi-user, multi-key, 
>transactional access to record based data under
> Linux/390?

Multi-user: yes.
Transactional: yes.
Multi-key: weeell, it depends on what you mean by multi-key.

Of the four current access methods (hash, btree, queue, recno), the
btree and hash ones are the generic key-based ones. If by multi-key,
you mean you want to have fields k1 and k2 so that lookup by the
pair (k1, k2) is fast and so is a lookup by (k1) then you can use a
btree with a flattened key field consisting of the concatenation of
the k1 and k2 fields (with canonicalised length). The btree will mean
that you can look up by (k1) and, by locality of reference, walk
through all ordered (k1,k2) tuples nicely.

If instead you want multiple independent key fields to data then you'd
have to build you own indices with either a natural primary key for
the main data or else recno access method and then manage separate
index databases of key -> record_id  (recno or primary key) mappings
yourself. Although db3 will do the ACID stuff for you, it won't do all
the fancy constraint and index management that a proper relational
database will do (whether DB2, PostgreSQL or whatever) but from my
minimal knowledge of ISAM, I don't think that does either.

> libdb last time I looked was just a disk based associative array handler...

Time to look again. Start, for example, at
        http://www.sleepycat.com/docs/ref/am_conf/intro.html

--Malcolm

--
Malcolm Beattie <[EMAIL PROTECTED]>
Linux Technical Consultant
IBM EMEA Enterprise Server Group...
...from home, speaking only for myself

Reply via email to