| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Demo: Modelling Cost of Travel Paths Between Towns
> There is no such time as 24:00 Hrs; read ISO-8601.
You are correct (but XDb2 has nothing to do with ISO-8601).
> ... SQL Script ....
Thanks for posting the script to model the data in RM. Below is XDb2's script to model it in approximately the same manner. A view of the data in a tree and grid is shown at www.xdb2.com/Example/Ex112b.asp
// Create base classes/verbs
CREATE2 *trip.cls = thing;
CREATE2 *city.cls = thing; CREATE2 *a.cls = city; CREATE2 *b.cls = city; CREATE2 *c.cls = city; CREATE2 *d.cls = city; CREATE2 *src.cls = verb; CREATE2 *dest.cls = verb; CREATE2 *weekday.cls = thing; CREATE2 *start.cls = thing;
// Create trip from a to b
// on monday from 00:00 to 24:00 costs 1.00
CREATE2 *;
CREATE2 it.cls = trip; CREATE2 it.src = a; CREATE2 it.dest = b; CREATE2 it.weekday = +monday; CREATE2 it.start = +00:00; // inclusive CREATE2 it.end = +24:00; // exclusive CREATE2 it.cost = +1.00
// Create trip from b to a
// on monday from 00:00 to 24:00 costs 1.00
CREATE2 *;
CREATE2 it.cls = trip; CREATE2 it.src = b; CREATE2 it.dest = a; CREATE2 it.weekday = +monday; CREATE2 it.start = +00:00; // inclusive CREATE2 it.end = +24:00; // exclusive CREATE2 it.cost = +1.00;Received on Tue Nov 09 2004 - 00:43:30 CST
![]() |
![]() |