Re: Demo: Modelling Cost of Travel Paths Between Towns
Date: 11 Nov 2004 20:47:34 -0800
Message-ID: <4b45d3ad.0411112047.56e519d7_at_posting.google.com>
> I thought YOU were the Original poster, at least that's how it looks
The OP was in OT titled "Representing a Graph in an RDB...again...(BUT
DIFFER...". For some reason, I failed to post there.
> > CREATE2 (a.goto=b).weekday = +monday;
> > The + indicates that if monday does not already exist as an instance
> > of the verb (weekday), go ahead and create it.
>
> How does the language distinquish between the operation or changing the
> value to +1 from the operation of adding a new instance with the value 1.
By enclosing it in quotes (ie CREATE2 (a.goto=b).weekday = +'+monday';). The portion after the optional + is the string that will name the new instance. The prior command creates a weekday named by the string '+monday' if it does not already exist. Currently UPDATE has not been implemented but it may look like this UPDATE2 john.age=35 to 54; or UPDATE2 john.favorite-word="to" to "too";
> Matching that model in a Relational data model is easy enough.
> (Joe Celko already posted a SQL model.)
In RM's current solution, symbol and town name are the same thing resulting in inflexiblity in above case. In XDb2's solutions a symbol or string names a town which is a different thing than the symbol or string. RM has its own advantages which I did not list here. Received on Fri Nov 12 2004 - 05:47:34 CET