Re: Data structure for indexing on multiple keys.

From: J.H.Jongejan <jjan_at_cs.rug.nl>
Date: Wed, 08 Sep 2004 14:58:37 +0200
Message-ID: <chmupi$85d$1_at_info.service.rug.nl>


Shankar wrote:
> Hi,
>
> I have fair knowledge of B-tree and hash indexing mechanisms. What
> data structure/algorithms should I read upon if I want to create indexes
> on multiple keys of a same relation? For e.g if a Employee relation has
> EmpNo, EmpName, EmpSalary, EmpDepth attributes & users can query on any
> of these attributes. Do I create separate B-trees for each key?
>
> Please note that this is not about composite keys but supporting
> multiple keys for searching. Thanks in advance for inputs!
>
> Regards,
> Shankar
>
Ah, you choose a primary key. This key is used to create a B-tree. Then you create so called indexes on other attribute-sets to speed up search on those attribute-sets. These sets do not need to be a key, this has only repercussions on the implementation of the indexes. You can read about indexes (B-tree is one type of index implementation) in many database books: I use Elmasri/Navathe (Addison-Wesley).

With regards,

Jan Jongejan
Dept. Comp.Sci.,
Univ. of Groningen,
Netherlands. Received on Wed Sep 08 2004 - 14:58:37 CEST

Original text of this message