5 Replies - 890 Views - Last Post: 31 August 2010 - 05:17 AM Rate Topic: -----

#1 Apprentice123  Icon User is offline

  • D.I.C Regular

Reputation: -16
  • View blog
  • Posts: 265
  • Joined: 30-June 08

Prolog

Posted 28 August 2010 - 01:37 PM

As it builds a database in Prolog ?

For example:
Car(A) A is a car
Engine(A) A is Engine
Axis(A) A is a axis
Wheel(A,B) A is wheel embedding Axis, B is side which fits


Who I make a database for this ?
Is This A Good Question/Topic? 0
  • +

Replies To: Prolog

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10336
  • View blog
  • Posts: 38,259
  • Joined: 27-December 08

Re: Prolog

Posted 28 August 2010 - 02:06 PM

Are you asking about working with a SQL Engine with Prolog? If so, I found this which may help you. If not, can you clarify your question?
Was This Post Helpful? 0
  • +
  • -

#3 Apprentice123  Icon User is offline

  • D.I.C Regular

Reputation: -16
  • View blog
  • Posts: 265
  • Joined: 30-June 08

Re: Prolog

Posted 28 August 2010 - 02:30 PM

View Postmacosxnerd101, on 28 August 2010 - 01:06 PM, said:

Are you asking about working with a SQL Engine with Prolog? If so, I found this which may help you. If not, can you clarify your question?


I'm learning prolog and wondered how to create a database. For windows which Prolog compiler is best?
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10336
  • View blog
  • Posts: 38,259
  • Joined: 27-December 08

Re: Prolog

Posted 28 August 2010 - 02:35 PM

I Googled and got plenty of results for Prolog Windows Compilers. Take your pick. :)
Was This Post Helpful? 0
  • +
  • -

#5 Apprentice123  Icon User is offline

  • D.I.C Regular

Reputation: -16
  • View blog
  • Posts: 265
  • Joined: 30-June 08

Re: Prolog

Posted 29 August 2010 - 04:42 PM

View Postmacosxnerd101, on 28 August 2010 - 01:35 PM, said:

I Googled and got plenty of results for Prolog Windows Compilers. Take your pick. :)


I have the following questions:

I have the database:
contain(X,Y) X contains Y, X is a neighborhood that contains Y is an avenue
contain(street1, avenue3).
contain(street2, avenue8).
.
.
.


OBS: I have also a database: neighborhood and avenue

How can I make a rule "checks" that checks if a neighborhood contains an avenue ?
Was This Post Helpful? 0
  • +
  • -

#6 pchapin  Icon User is offline

  • New D.I.C Head

Reputation: 34
  • View blog
  • Posts: 43
  • Joined: 23-July 10

Re: Prolog

Posted 31 August 2010 - 05:17 AM

Just use the contain predicate. For example issuing a query of

contain(street2, avenue3).



would return "No" (assuming the data you show above is complete). You can also do queries such as

contain(street2, X).



to get all the avenues associated with a particular street. The interactive environment will unify X in all possible ways and show you each result one at a time.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1