Asserting facts and performing queries on it.

From: Sathish Kumar Murugesan <satish_79_at_yahoo.com>
Date: Tue 03 Apr 2001 05:02:53 PM GMT
Message-ID: <20010403170253.21001.qmail@web3102.mail.yahoo.com>
Hi, 

I need to construct a database which has 4 fields.
Say, if I need to have a template book with 4 fields -
author, year, title and publisher. I used 'assert' to
assert the fact in the database.

But how do I perform query on it? Say if I have lots
of books ranging from 1990-2000 and how do I pick up
the ones with the year as 1996?

I tried to used the functor name directly and used 
EC_atom year("1996");

and tried to perform the query on it 

post_goal(term(EC_functor(book(ECREF1, year, ECREF2,
ECREF3)));

But I am not getting any result for this. However, if
I use another EC_ref instead of EC_atom for the year,
it picks up the first fact from the database.

How do I get past this and perform query on it, and
get just what I want from the database? And how do I
get more than one query result, in my C++ and Eclipse
integrated program?

Thanks in advance,
Sathish.

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/
Received on Tue Apr 03 18:04:44 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:08 PM GMT GMT