Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Object > Re: Storing dat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 34 Topic 276 of 366
Post > Topic >>

Re: Storing data and code in a Db with LISP-like interface

by "Nick Malik [Microsoft]" <nickmalik@[EMAIL PROTECTED] > Apr 22, 2006 at 10:11 AM

> Now, suppose I wanted to classify an actual tomato (tomato1) as both a
> fruit and a vegetable, where would I add it to the above "class
> hierarchy"? (You don't need to show me actual Prolog, just adjust above
> tree)
>

Prolog is a graph, not a tree.  To illustrate it as a tree misses the
point. 
Humans <categorize> in trees, but our brains <think> in graphs.  We freely

associate things as they need to be, with relation****ps that cannot be 
categorized with a single taxonomy.  Multiple overlapping taxonomies are 
required.  Prolog simply removes the requirement for a single taxonomy.

To solve the problem I posed, I placed the entire prolog program below,
with 
the two facts you provided (Tomato is both a fruit and a vegetable).

You could just as easily have asked "Why the Tomato is both a fruit and a 
vegetable," and with the addition of attributes and decision criteria, you

could have the Prolog app reply that a Tomato is, in fact, both but that
an 
Apple is both a fruit and a computer.  :-)  If you tell me what you would 
consider those criteria to be, I'll be happy to update the app to reflect.

Note: the verb 'named instance' and 'subtype' are invented.  I invented
them 
for this example.  They could just as easily have been 'foo' and 'bar'.

named_instance(john,person).
named_instance(mary,person).
subtype(apple,fruit).
subtype(banana,fruit).
subtype(tomato, fruit).
subtype(tomato, vegetable).


-- 
--- Nick Malik [Microsoft]
    MCSD, CFPS, Certified Scrummaster
    http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not 
representative of my employer.
   I do not answer questions on behalf of my employer.  I'm just a 
programmer helping programmers.
 




 34 Posts in Topic:
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-12 00:57:05 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-13 16:48:22 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-14 00:56:12 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-16 16:25:50 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-17 07:39:07 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-17 20:07:26 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-18 23:13:34 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-22 10:11:59 
Re: Storing data and code in a Db with LISP-like interface
Pascal Bourguignon <pj  2006-04-23 01:55:15 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-28 09:23:34 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 13:05:58 
Re: Storing data and code in a Db with LISP-like interface
Pascal Bourguignon <pj  2006-04-21 16:33:02 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 14:49:06 
Re: Storing data and code in a Db with LISP-like interface
Pascal Bourguignon <pj  2006-04-21 17:13:44 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 17:13:50 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 18:33:19 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 20:44:02 
Re: Storing data and code in a Db with LISP-like interface
"David Cressey"  2006-04-22 15:04:03 
Re: Storing data and code in a Db with LISP-like interface
Bill Atkins <NOatkinwS  2006-04-22 12:57:37 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-22 17:29:38 
Re: Storing data and code in a Db with LISP-like interface
A..L. <alewando@[EMAIL  2006-04-22 14:11:05 
Re: Storing data and code in a Db with LISP-like interface
Frank Hamersley <terab  2006-04-23 08:30:45 
Re: Storing data and code in a Db with LISP-like interface
"Dmitry A. Kazakov&q  2006-04-21 22:27:47 
Re: Storing data and code in a Db with LISP-like interface
"Dmitry A. Kazakov&q  2006-04-22 11:12:09 
Re: Storing data and code in a Db with LISP-like interface
Sasa <sasa555@[EMAIL P  2006-04-21 22:38:36 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-21 21:03:30 
Re: Storing data and code in a Db with LISP-like interface
Sasa <sasa555@[EMAIL P  2006-04-22 07:40:29 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-22 10:47:30 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-22 18:46:57 
Re: Storing data and code in a Db with LISP-like interface
Sasa <sasa555@[EMAIL P  2006-04-22 21:58:37 
Re: Storing data and code in a Db with LISP-like interface
Bob Badour <bbadour@[E  2006-04-22 20:10:22 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-22 10:20:37 
Re: Storing data and code in a Db with LISP-like interface
"Nick Malik [Microso  2006-04-22 12:29:41 
Re: Storing data and code in a Db with LISP-like interface
"Nameless" <  2006-04-23 17:28:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 10:28:22 CST 2008.