Implications of Relation-Valued Attributes

From: Marshall Spight <mspight_at_dnai.com>
Date: Wed, 02 Jul 2003 03:34:39 GMT
Message-ID: <jpsMa.1260$a45.3095_at_rwcrnsc52.ops.asp.att.net>



Hi all,

I've been thinking about relation-valued attributes lately. It strikes me that, while they have many useful properties, they also may have nasty implications.

Consider: in current products, attributes are limited to "scalar" types in general. If I read my TTM correctly, (or just by following this group) that idea appears distinctly too narrow. It seems we need at least:

scalars, including both system-defined and user defined sum types
lists (or sequences)
tuples
relations

and that these may be applied recursively. (TTM requires that the only globals be relations, but in light of having all the above type constructors, that begins to seem artificial to me.)

Once we allow these to be used recursively, we get allow some complicated structures. That is, we may have relations with attributes that are relations with attributes that are tuples that contain lists, etc. (The kind of thing I did in C in college :-)

Once we have these complicated structures, we have to be able to query them and update them, etc. I will simple wave my hand around the update issue for now; as we all know, the only necessary update operator is dbvar assignment. :-) But even just the query issue worries me.

I wonder if it might be legitimate, in light of the above, to want to query things according to structure. And now I start wandering into XQuery territory, and I get very uncomfortable.

One of my big objections to XQuery is how complicated it is. Worse, it misses out on one of the big wins of the RM: that structure and data are both expressed as data, which removes the need to have separate ways of querying and updating structure vs. data.

Anyone have any thoughts? Does allowing recursive data structures take us down a rabbit hole of querying by structure and into XQuery land? Or can we express every query we need to with just the relational algebra?

Marshall Received on Wed Jul 02 2003 - 05:34:39 CEST

Original text of this message