Re: B+ tree: How to obtain key from value

From: Jonathan Leffler <>
Date: Sat, 14 Jul 2007 05:25:56 GMT
Message-ID: <E7Zli.6949$>

Dimitry wrote:
> I am looking for solution (technique) that will allow me, while using
> traditional B+ tree, to obtain key from value without creating
> "reversed" table. Some overhead is acceptable but not "reversed"
> table. Looping is also not an option.


Generally, a B+Tree is an indexing structure that identifies a record. The record contains the key - and auxilliary data. So, you should be able to extract the key from the record, if you know the structure of the record. If you don't, you're on a hiding to nothing - there could be multiple keys that refer to the same data, in general, so there's no way to determine the key (nor, even, a key) from the value.

Jonathan Leffler                   #include <disclaimer.h>
Guardian of DBD::Informix v2007.0226 --
Received on Sat Jul 14 2007 - 07:25:56 CEST

Original text of this message