Re: Database-valued attributes?

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Tue, 11 Nov 2003 13:13:32 -0000
Message-ID: <boqng2$13fm$1_at_gazette.almaden.ibm.com>


"Alfredo Novoa" <alfredo_at_ncs.es> wrote in message news:e4330f45.0311110357.29213295_at_posting.google.com...
> "Marshall Spight" <mspight_at_dnai.com> wrote in message
news:<_C_rb.122225$9E1.607217_at_attbi_s52>...
>
> > what about
> > database-valued attributes? That is to say, what about an attribute
> > that consists of a set of relation values?
>
> It is simply RVAs with RVAs.
>
> If you want relations containing relations of diferent types you could
> define a type called RelationType that would be the set of all
> relation values.
>
> var a base relation { b RelationType } key { b };
>
> a := relation { tuple { b relation { a integer, b integer }
> { tuple { a 1, b 2 },
> tuple { a 1, b 3 } } },
> tuple { b relation { tuple { t 'Hello' },
> tuple { t 'Marshall' } } } };
>

So Alfredo, you are saying that relation literals (can) have names.

I.e. that the following is a vald set of tuples

{

  tuple { b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}
, tuple { c relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}
, tuple { b relation {tuple { t 'Hello' }, tuple { t 'Jonny' }}}
, tuple { b relation {tuple {a 1, b 2 }}
};

Which would mean that

     tuple { b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}} <> tuple { c relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}

And that

    b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }} <> c relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}

And that

    b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}} <> relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}

And that

    b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}} <> SELECT t FROM relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}

But that

    b relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}} = b SELECT t FROM relation {tuple { t 'Hello' }, tuple { t 'Marshall' }}}

Ugh

IMHO. Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Tue Nov 11 2003 - 14:13:32 CET

Original text of this message