Re: What databases have taught me

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Sat, 24 Jun 2006 02:41:09 GMT
Message-ID: <9D1ng.1378$pu3.36655_at_ursa-nb00s0.nbnet.nb.ca>


Marshall wrote:

> Bob Badour wrote:
>

>>Would (R AND x = 1 AND y = 2) = (x = 1 AND y = 2 AND R) ?

>
> I'd think it would have to, wouldn't it? Assuming = binds with
> higher precedence than AND in the above syntax, and assuming
> AND is associative and commutative, which I would hope it
> would be. It is in the Tropashko algebra.
>
>
>>If so, wouldn't that make name resolution kinda complicated and perhaps
>>error-prone?

>
> I don't see any obvious complications to name resolution, but then
> I might be mising what you're getting at.

How will the dbms know when a name refers to an attribute vs a relation variable?

Consider:

R AND x = y

What if the dbms has relvars x and y and R has attributes x and y?

  As to error-prone,
> (assuming we are talking about the progammer writing the
> above code) yes, it might be, especially at first. I would
> expect to address that issue with coding conventions and
> possibly syntactic support. It's hard to say how much of
> an issue that will be without field experiece. (Which I don't
> have with this question.)

Okay, as long as we are not talking about the language the programmer works in, one can handle name resolution syntactically in the human-readable language and use something unambiguous internally. Received on Sat Jun 24 2006 - 04:41:09 CEST

Original text of this message