[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: multi-valued attribute indexes [x]



On Mon, Nov 19, 2001 at 06:12:47PM -0600, Fernando Medina wrote:
> If I have a multivalued attribute with 3 entries, can I assume that
> thata attribute array will never change, unless it's modified.  Can I
> assume that attribute[0], attribute[1] etc, will always be in that
> order?

No. In practice I believe the order is always the same, but you
shouldn't assume that. AFAIK there is nothing in the specs saying that
there is an ordering, it's just a set of values.

> Next, if I delete attribute[1] will attribute[2] become attribute[1], or
> will there be a space there?  Is there a way I can "tie" several

No space, but ordering shouldn't be trusted.

> multivalued attributes, so that Bigattribute[0] will always correspond
> to Smallattribute[0], if one is deleted, the other is deleted, etc? 
> thanks,

No, and if you want to have some sort of pairing/grouping of certain
attribute values, you have to do it using extra entries, or possibly
some special coding of the values.

If you want to have a special ordering (and more or less the same for
grouping), I can think of a couple of solutions. Say that you have
attributes A B C that you want in that order. You could use three
entries each with one attribute value (A, B or C), and another
attribute that has value 1, 2 or 3. Another possibility could be to
not store the value A, B and C, but take that value and prefix it
with some ordering, so that you store say 1A, 2B, 3C. Which IMHO is
rather ugly.

Stig