directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <aok...@bellsouth.net>
Subject RE: [bdbje] [rms] Using rowid in secondary databases
Date Fri, 16 Apr 2004 15:44:22 GMT


> -----Original Message-----
> From: Linda Lee [mailto:linda@sleepycat.com]
> >
> >
> > Alex Karasulu wrote:
> >
> >> I'm envisioning the use of sequences to do this in a structure like so:
> >>
> >> http://nagoya.apache.org/jira/secure/attachment/14385/DatabaseTable.png
> >>
> >> Now I'm sure the folks at SleepyCat thought about this one before.
> >> Wondering what your findings were if the use of integers and
> >> sequences was thought of to tie together secondary and master
> >> databases.
> >>
> > I believe that this can be done easily using our secondary databases
> > as indices.
> 
> My apologies -- I build the previous example against the current code
> base, and there has been a minor api change, where the order of two
> parameters was switched to make it more consistent. Appended is an
> example that I compiled and ran against the 1.3.0 beta jar.

No problem at all I was only reading it and have not compiled it.  I 
never noticed the parameter order changes.

> > Hmm, I believe you're right. We're always returning a SecondaryCursor
> > when we get a cursor on a secondary database, and that class always
> > fetches data from the primary database. I'll check with some other
> > folks who are more familiar with secondaries though.
> 
> Also, I was wrong here -- it is possible to retrieve only the true key
> and data of a secondary database by treating it as a primary database.
> The example now illustrates this by fetching from the key1 database, and
> returning tuples of key1/rowid.

Oh that's wonderful - this means that I can have much more efficient 
lookups.  I was starting to get depressed :-).  Now I'm happy!

Thanks,
Alex




Mime
View raw message