Re: A simple notation, again

From: paul c <>
Date: Mon, 16 Jul 2007 16:57:10 GMT
Message-ID: <GrNmi.123028$NV3.18383_at_pd7urf2no>

David Cressey wrote:
> ...
> I'm toying with this:
> [["David" "Cressey" 1]
> ["Marshall" "Spight" 2]
> ["Bob" "Badour" 3]
> ["Jan" Hidders" 4]]
> This would represent a relation of order 3 and cardinality 4.
> Does tutorial D have a way of laying out a relation as an explicit literal
> character string?

Here is a part of an example from TTM RM prescription 7:

"... RELATION { TUPLE { P# P#('P1'), QTY QTY{ 600} } ,

                 TUPLE { P# P#('P5'), QTY QTY{ 500} } , ...".

Earlier in that prescription is this comment:

"Observe that Tutorial D deliberately does not provide a separate "define relation type" operator, for much the same reasons that it does not provide an "define tuple type" operator. In other words, we simply permit relation types to be used "inline" ...".

Here is something different from prescription 6:

"ADDR := TUPLE { STREET 'One Jacob Way',

                  CITY   'Reading',
                  STATE  'Massachusetts',
                  ZIP    '01870' } ; "

In the formal definitions (, the notation is different, eg.:

"Let tr be a tuple that conforms to Hr; i.e., tr is a set of ordered triples of the form <A, T, v>, one such triple for each attribute in Hr."

(On the surface, this might seem dangerously suggestive of XML!)

Maybe this highlights a difference between a notation and a grammar. For this purpose, a grammar akin to what I think I remember from SQL doesn't bother me, eg., a heading specification that implies a positional context for the tuples that follow it.

p Received on Mon Jul 16 2007 - 18:57:10 CEST

Original text of this message