Database code
Luke Kenneth Casson Leighton
lkcl at samba.org
Wed Dec 29 18:30:52 GMT 1999
On Wed, 29 Dec 1999, Andrew Tridgell wrote:
> > can your database code provide the following functionality:
> >
> > - two unique, primary keys
> >
> > - atomic addition of entries
>
> yes and yes
excellent.
> to do the former you need to do this for a store:
>
> - lock database (tdb_writelock())
> - tdb_store() the record for the secondary key mapping it to the primary key
> - tdb_store() the main record
> - unlock database (tdb_writeunlock())
um.
hmmmm...
ok, what i should have explicitly stated is:
- is it possible to have two (or more) unique primary keys
- is it possible to do fast lookups on all those keys
> I don't want to build in multi-key directly to tdb as I want tdb to
> stay really simple, instead use the above simple wrapper to do
> multi-key.
can that be abstracted to another level?
More information about the samba-technical
mailing list