Re: What databases have taught me



Bob Badour wrote:
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?

Ah, I see what you're saying now. Yes, that could well be an issue.
I'm not familiar enough with this syntax to say much.


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.

Yes. Again, I'm not much familiar with the above syntax, but I could
well imagine some challenges cropping up, given the lack of any
marker characters and the (multiple?) uses of '='.


Marshall

.



Relevant Pages

  • Re: Stored Procedure Syntax
    ... There is no such thing as "other DBMS". ... dialect of SQL or its own syntax. ... You cannot compare them because it does ...
    (microsoft.public.data.ado)
  • Re: Parallel multi-relational collections
    ... Oracle, SQL Server, DB2, Informix, ... I think that DB2 is the only that supports this. ... different syntax for the same: ... With the rest of the DBMS you should write an stored procedure. ...
    (comp.object)
  • Re: Identischer SQL - Befehl liefert zwei unterschiedliche Werte
    ... Unsinn mit aufgegeben. ... Und jedes DBMS hat andere Regeln für die alte Syntax, ...
    (microsoft.public.de.sqlserver)
  • Re: Need to return Data Across DataSet Tables...
    ... Table A is filled from a DBMS and Table B is updated from the application ... > You will need to get the syntax right for the particular DBMS you are ... > Kerry Moorman ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: What databases have taught me
    ... What if the dbms has relvars x and y and R has attributes x and y? ... As to error-prone, ... possibly syntactic support. ... 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. ...
    (comp.databases.theory)