Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Neo <neo55592_at_hotmail.com>
Date: 19 Nov 2004 11:45:06 -0800
Message-ID: <4b45d3ad.0411191145.2b92d71b_at_posting.google.com>


> > "SELECT %.age & %.name=john" works until eternity.
> > Could you show RM's query that will work until eternity.
>
> CREATE TABLE test (class VARCHAR2() PK, name VARCHAR2() PK, age NUMBER);
> INSERT INTO test VALUES (put the values here);
> SELECT * FROM test WHERE age > 0;
> ALTER TABLE age ADD color VARCHAR2(50);
> UPDATE age SET color = 'brown' WHERE class = 'Tree Trunk';
> SELECT * FROM test WHERE age > 0;

Could you fix the above, I want RM's query to find anything named john and has an age, without NULLs or redundant representations. Assume RMDM and R2D2 are two robots sent to Mars. They are similar except for their database. RMDM is based on RM and uses your above initial schema. R2D2 is based on XDb2 which doesn't require a "schemas" per se.

Landing on Mars, RMDM and R2D2 meet a martian who doesn't have a name and his age is unknown. Here is how R2D2 represents him using XDb2:

// Create a thing named martian
CREATE *martian.cls = thing;

// Create a thing whose class is martian CREATE *;
CREATE it.cls = martian;

// Execute query
// Finds nothing
SELECT %.age & %.name=john"

Please show how RMDM deals with the above (without NULLs and redundancy) starting with your corrected initial schema. If you weren't expecting this case, surprise #1. Received on Fri Nov 19 2004 - 20:45:06 CET

Original text of this message