| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Thinking about MINUS
Marshall wrote:
> That was a lot to digest. I read it all twice, and I think we are
> mostly
> on the same page. In particular I am quite convinced of the importance
> of names, and though you didn't mention it specifically, the value
> of an algebraic approach as per the Darwen article you referenced.
> (Which I also read, since it had been a long time since I first read
> it.)
>
> There are only a few things I want to respond to.
>
>
> On Jan 9, 8:58 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>
>>Agreed. In fact, if I recall correctly, someone once determined that the >>lint warning for unused local variables correlated more with bugs than >>any other warning or error message. Of course, that might be urban >>legend. (I am relying solely on a ~20 year old memory, and I doubt I >>read the original work.)
>>>To my way of thinking, the database is a namespace that contains >>>named relvars, or in SQL we say "tables." *Each* table is itself >>>a separate namespace for attributes. >> >>When it comes to relations, I disagree, and I see no reason to >>perpetuate the sins of SQL.
I am saying that the relation does not determine the namespace. The context in which the relation is used determines the namespace. If two relations are never used in the same context, similarity of names has no effect, and there is no harm in using the same name for different things.
The rename operation is the mechanism by which we resolve the names to use in a given context.
>>We have a formalism for expressing predicates as constraints. Data types >>are merely constraints in those predicates. The manipulation rules spell >>out what to do with those constraints in various situations, and the >>rules differ from one situation (ie. operation) to another.
Generic operations muddy the waters because the static analysis is not possible until one instantiates a specific operation from the generic template.
> Type constraints are typically entirely static, whereas many
> kinds of common database constraints, such as foreign key
> constraints, are necessarily runtime checks.
Agreed.
> I mention this because, while in general I agree that
> type constraints are simply a kind of general constraint,
> I believe that it is important to distinguish between
> static and dynamic constraints, as they will not be
> handled the same. However I am not entirely clear
> how to expose this difference to the programmer. The
> traditional method, in which type constraints are exclusively
> static and check constraints are exclusively dynamic,
> does not satisfy me.
I suspect some products already do more static checking than that; although, I am sure they do not do all the static checking they could.
>>To join the attributes, we must agree to use the intersection of their >>domains. This suggests the data type must be a subtype of both >>attributes. Joining reals with integers, one necessarily ends up with >>integers. In fact, it should be the most general common subtype or least >>specific common subtype of the declared types. >> >>Thus for completely disjoint declared types, the data type of the >>resulting attribute is the universal subtype not the universal >>supertype. The universal subtype, of course, has an empty set of values >>and the union of all operations.
Agreed. Such a dbms would have no choice but to treat the result as an error due to its limitations.
> Anyway, thanks for the lengthy reply.
I apologize for the length. I was too busy yesterday to write a shorter one. Received on Wed Jan 10 2007 - 08:02:29 CST
![]() |
![]() |