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

From: Nick Malik [Microsoft] <nickmalik_at_hotmail.nospam.com>
Date: Mon, 1 May 2006 23:09:27 -0700
Message-ID: <waOdnXAwWYV0ZcvZnZ2dnUVZ_sKdnZ2d_at_comcast.com>


"Neo" <neo55592_at_hotmail.com> wrote in message news:1146433434.343813.221950_at_e56g2000cwe.googlegroups.com...
>>>> It seems there maybe yet another reason. Prolog may not provide a
>>>> method to determine the function given one set of parameter already
>>>> specified. Can some experiences Prologer correct me on this?
> .
>>> Can you make your statement in a way which is more test-friendly?
>
> Enter the following in Prolog: like(john, mary).
> Now there is no way to determine the relationship between john and
> mary. This is because queries in Prolog find function parameters not
> the function itself. Here is how to do it in dbd (abridge script):
>
> (create john like mary)
> (select john * mary) // displays like
>
> The Prolog examples you gave were fine, however none of them showed
> the ability to determine the relationship between things.
>
>> I'll re-ask: for what purpose do you need to know it?
>
> The significance of knowing the relationship between two things is too
> basic for me to want to explain :)
>

I'm sorry, Neo. But it is not. Explaining your requirements is not 'too basic' for you or anyone else. If you expect intelligent people to hold a discourse with you, you have to treat us with enough respect to back away from rampant superiority to think about the question.

You have assumed that it is valid to create a relationship between two things and to want to know what that relationship is. I have SHOWN you how Prolog would do this, by identifying the relationship as one of the items in the tuple. But you have rejected this representation of knowledge. Instead, you have resorted to a representation that does not hold the information you ask for, then you fault the LANGUAGE for not holding the information. It is no more a fault of the language that you cannot determine the relationship that it would be for a relational database to use incorrect keys to manage a many-to-many relationship. It is the fault of the designer, not the system.

Prolog and Lisp are knowledge representation systems. Relational databases are primarily data representation systems, but if you look at the schema, you can quite frequently ascertain the business rules that existed at the time of design. Perhaps this is a bad place to code business rules. Perhaps not. I think that there are arguments both ways. Regardless, knowledge is represented both in the form of facts and in the form, in the case of Lisp and Prolog, in deductions.

Therefore it is absolutely incumbent upon you to explain why you would want to choose a knowledge representation that does not collect a bit of information and then assert that the mining of that information is so fundamental to the requirements as to be beneath you to explain it.

-- 
--- 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.
-- 
Received on Tue May 02 2006 - 08:09:27 CEST

Original text of this message