Re: Normalizing Every Thing with XDb2
Date: 27 Jul 2004 19:08:44 -0700
Message-ID: <4b45d3ad.0407271808.64463c9c_at_posting.google.com>
> > www.xdb2.com/Example/BoxProperties.asp shows a box whose thickness is 1 cm,
> > weighs 1 kg and costs 1 $. Each property references the same quantity 1.
>
> x wrote: I looked at your example and I have only seen three pictures that
> means nothing.
In general, when the tree shows:
thing
inst: box inst: box1 thickness: 1cm qty: 1 unit: cm
It means:
thing's instance is box.
box's instance is box1.
box1's thickness is 1cm.
1cm's qty is 1.
1cm's unit is cm....
>I have not seen the script you used to create the database.
Below is the script to create the db:
create *quantity cls thing. // *x => create a new thing and name it x. create *1 cls quantity.
create *unit cls thing. create *cm cls unit. create *kg cls unit. create *$ cls unit. create *distance cls thing. create *. // Create a new thing. create * cls distance. // ' * ' refers last new thing created by '*.'create * quantity 1.
create * unit cm.
create *mass cls thing. create *. create * cls mass. create * quantity 1. create * unit kg. create *money cls thing. create *. create * cls money.
create * quantity 1.
create * unit $.
create *thickness cls relator. create *weight cls relator. create *cost cls relator.
create *box cls thing.
create *box1 cls box.
create box1 thickness (distance)((quantity)1)((unit)cm). // Rel expression
create box1 weight (mass)(1)(kg). // Simplified relational expression
create box1 cost (money)(1)($).
If someone could suggest a clearer syntax, I am open to suggestions. Received on Wed Jul 28 2004 - 04:08:44 CEST