Re: Types and "join compatibility"
Date: Sat, 30 Jul 2005 19:49:27 GMT
Message-ID: <bRQGe.69169$5V4.11882_at_pd7tw3no>
André Næss wrote:
> ..
>
> I'm interesting in both theoretical considerations as well as practical
> experiences. Does there exist any (prototype) implementations of the
> relational algebra coupled with a fairly powerful type system?
>
> ...
I like this question because it helps make it clear to me that RM per se doesn't understand equality. I don't claim to be encompassing because I know almost nothing about type theory and besides I read very little about db theory, but I can point you to TTM ("The Third Manifesto" by Darwen & Date) which might be saying that what you want to do is exactly right (see IM prescription 13) (and that A is not the resulting type). Their example is an ELLIPSE supertype and CIRCLE subtype. These would correspond to your A and B types respectively. They say the resulting type is CIRCLE, in your case B. They call it the most specific common supertype. I was comforted by the fact that they go out of their way to say that the result might seem counter-intuitive.
IM prescription 12 seems to imply the same thing (because if comparison on scalars doesn't give same answers as within other operators then a contradiction is bound to ensue). Maybe other parts of the book cover it too.
That's assuming your example doesn't really stand about subtables.
(Personally, I accept what D&D say about this. Although I can't say TTM is the best book about db, since i've only ever had a few dozen of them, most of which i gave up reading early on because they were just regurgitating things, making things up, imagining things or in a few cases talking about things that were over my head. Plenty of TTM is over my head too but it's still the best db book i've ever partly.)
pc Received on Sat Jul 30 2005 - 21:49:27 CEST
