HP3000-L Archives

October 1997, Week 5

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Thu, 30 Oct 1997 18:13:35 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
John writes:
...
> Many people keep data in detail datasets with automatic masters, rather
> than in manual masters so that it can be accessed by other keys.  If you
> want to add a B-tree to this dataset on, say, a name field, then this field
> must be given its own automatic master in order to access it using a
> B-tree.

Not necessarily ... is this "name field" a search field?  If so, then there's already
a master dataset (auto *or* manual, we don't care).  That's the dataset you'd
add a B-Tree to.

> This adds one extra level of updating and searching as compared to
> a B-tree constructed directly on the detail data set.

Only if you wanted the B-Tree for a field that isn't a search field already.

> From another point of view, if you want more than one B-tree on a
> particular dataset, it must be a detail and there must be a master
> (automatic or manual) for each index.

Sort of...

B-Trees are always associated with master datasets (auto or manual),
not detail datasets.

If a detail dataset has a search field, and the master that field is
linked to has a B-Tree, then you can do a B-Tree DBFIND on the detail
(for that field).

If three different detail datasets have the search field "ordernum",
and they're linked to a master whose key is "ordernum", and that master
has a B-Tree attached, then you can B-Tree search:

   1) each of the three detail datasets (on "ordernum");

   2) the master dataset (on "ordernum").

--
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2