Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: why hierarchy?

Re: why hierarchy?

From: Neo <neo55592_at_hotmail.com>
Date: 27 Jul 2006 12:38:26 -0700
Message-ID: <1154029106.506661.55610@s13g2000cwa.googlegroups.com>


> Neo, as far as I can tell, no one understands ...

Ok, we can finish a prior example posted by you in "Poll: Expert user vs. Internals Expert". Below you used Tutorial D(?) to model that Bob and JayDee are sages, and Neo is a jerk, and that Bob's state is on, and Neo's state is off.

>  var sage real relation { name char } key { name } ;
>  sage += relation {tuple { name 'Bob' }, tuple { name 'JayDee' } };
>
>  var jerk real relation { name char } key { name } ;
>  jerk += relation {tuple { name 'Neo' } } ;
>
>  var state real relation { name char, state char } key { name } ;
>  state += relation {tuple { name 'Bob', state 'on' }, tuple { name 'Neo', state 'off' } } ;

Below is dbd's script to represent the above:

(; Create sages and jerks)
(new 'bob 'sage)
(new 'jayDee 'sage)
(new 'neo 'jerk)

(; Create on and off states)
(new 'on 'state)
(new 'off 'state)

(; Create bob's and neo's states)
(create bob state on)
(create neo state off)

JayDee, now I would like you to extend your initial example to match dbd's extension below:

(; Find the relator/verb between bob and sage)
(; Finds class)
(select bob * sage)

(; Find the relator/verb between sage and bob)
(; Finds instance)
(select sage * bob)

(; Represent that classifications sages and jerks are opposites)
(new 'opposite 'verb)
(create sage opposite jerk)
(create jerk opposite sage)

(; Find things whose classification is opposite of neo's)
(; Finds bob and jayDee)
(select (select (select neo class *) opposite *) instance *)

(; Represent that states on and off are opposites)
(create on opposite off)
(create off opposite on)

(; Find things whose state is opposite of neo's)
(; Finds bob)
(select * state (select (select neo state *) opposite *))
Received on Thu Jul 27 2006 - 14:38:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US