Date: Wed, 06 Jul 2005 18:52:12 GMT
Jon Heggland wrote:
> In article <q_Cye.138126$Kn.7314565_at_phobos.telenet-ops.be>,
> jan.hidders_at_REMOVETHIS.pandora.be says...
>>>Yet you did say "Another option is to treat the field as a set-valued >>>field (since it apparently can contain 0 or 1 values) which >>>means that you are not in 1NF and should first normalize such that you >>>are." >> >>Good point. I'm making the silent assumption here that if you allow >>nested relations, then you probably also have the nest/unnest relations >>as are usually found in the nested relational algebra.
> The quote didn't mention nested relations, it is about sets. Do you make
> that assumption about sets as well? Why?
These sets are very similar to unary relations. Treating them differently would make not much sense because there are simple operations that transform one into the other.
>>If you don't have >>those then you are arguably treating it more as an atomic value than a >>set value.
> So the presence of nest/unnest is the problem? For the sake of the
> argument, let us say that a relation with relation-valued attributes is
> in 1NF iff there are no nest/unnest operators.
It's close, but not exactly what the definition says. But nevermind, I think it's close enough so let's assume it for the sake of the argument.
> Given the above definition, do you think that a relation with relation-
> valued attributes in the presence of nest/unnest should be "normalised"
> to reach 1NF? Why?
It ensures that the operations at relation level are essentially those of the flat relational algebra and that they all work, in some sense, at the same level. The theory of query optimization for these operation is reasonably well understood, which is far less the case for operations that mix the levels of computation such as the nest and unnest do. In some sense we are forcing here the user to keep things simple so that the job of the query optimizer becomes easier.
> (Btw, I'm not sure what you mean by "nested relational algebra"---Date's
> GROUP and UNGROUP don't affect the other operators in any way.)
I use the term as it is commonly used by database researchers and that is the one you find if you google for "nested relational algebra". I'm not sure what you mean by "affect the other operators" here.
- Jan Hidders