Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: Storing data and code in a Db with LISP-like interface

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

From: mAsterdam <>
Date: Sat, 29 Apr 2006 12:50:32 +0200
Message-ID: <445344be$0$31655$>

Neo wrote:

>>>Note: I deduct points for methodologies that are not systematic :)
>>I'm tired of this game.

> :) The human mind is so powerful that it routinely makes complex things
> appear as games. Sometimes when people present a solution they do not
> realize that it is not systematic or missing relevant data because
> their mind is filling in the gaps. These gaps are best realized when
> one actually trys to implement a program, like an android, to do what
> humans see as simple. Your solution is not systematic and is missing
> relevant data.

Systematic - according to which system?

> According to Prolog documentation, it appears the following syntax: "x

Please provide a reference for this.
I think you have a point here (relevant to your quest), but ISTM you didn't precisely get it.

> (y)" can only be interpretted in one way, that is "y isA x". If this is
> true, then so far Prolog is systematic. An andriod-like program can
> count on it to determine the relationship between any x and y.
> According to Prolog doc, it appears the following syntax: "x (y, z)"
> can be interpretted (by user) as either "y x z" or "z x y" because both
> versions are fine, however it is a good programming practice to stick
> to either convention during the writing of single program to avoid
> confusion. This is not quite systematic but I can live with it.
> However, if one andriod was built using "y x z" and the other with "z x

Ah! A change of scenery: we now have /two/ droids wanting to communicate, and it looks like your solution to this is straight-forward sharing of data - which means they need to share a common data-structure. This would mean ad-hoc 'create' (SQL-DDL.create) is out.

> y", the would misinterpret each other. Such type of misinterpretation
> would not occur if the andriods were built with dbd.
> Now beyond two parameters, Prolog is not systematic.

I don't think systematic is the right term here. Prolog is systematic allright here, it uses a positional parameter style. (Not dismissing your point, just asking you to rephrase).

> It is up to the user to be systematic.

Rephrased: It is up to the programmer to keep the right positions for the parameters.

> In your solution, you used the syntax "x (y, z,
> q)" and it seems to imply that "y z q isA x", which I was able to
> figure out using my mind, but the andriod would not know this rule
> unless it was a standard rule or told that "x (y, z, q)" always implies
> "y z q isA x" for every x, y, z, q.
> Let's apply your implied rule to the following from a different user:
> bought (john,10,apple). This implies "john 10 apple isA bought" ???
> This doesn't make much sense. What we are missing are the rule(s)
> implied in the other user's mind when writting this statement,
> processing against such data and interpretting results. Same thing
> here, I need to know your implied rules to interpret things properly
> (which in this case are fairly obvious to humans). These rules are not
> standardizes {like for x (y)} and you didn't represent them in the
> solution.
> The reason you probably didn't implement a more systematic solution (as
> shown below) is because Prolog probably does not allow functions (not
> function results) to be parameters.
> like (john, mary)
> hate (john, bob)
> opposite (like, hate) /// Is this possible in Prolog ????

Yes, google for MI (meta-interpreters).
They seem easy, and there is support for them in most prologs. I am not familiar with them, though.

> Instead you used two different methods to relate things:

>>opposite (like,hate).
>>relationship (john,like,mary).
>>relationship (john,hate,bob).
>>// let's pose the question:
>>// for whatever relationship john has with mary, find another person with
>>whom john has the opposite relationship
>>? relationship(john, R1, mary), opposite(R1, R2), relationship(john, R2,
>>Prolog replies
>>   R1 = like
>>   R2 = hate
>>   Other = bob
>>OK. I've done my part

> Try this experiment,

Neo, by dismissing implementation strategies for the wrong reasons you piss people off who do know what they are talking about. Are you serious about getting multi-discplinary collaboration?

> replace john, mary, bob, likes, hates, opposite,
> relationship with letters a, b, c, d, e, f and g. Then it might be
> easier to realize that f(d,e), g(a, d, b) and g(a, e, c) is not
> systematic and missing some rules that are not standard or represented.
> Why do you use two different methods to represent essentially the same
> type of relationships? And since there is no standard for interpretting
> the format f(d, e) and especially g(a, d, b), where did you represent
> them in the solution? If Prolog doesn't allow functions (not function
> results) to be parameters, this will ultimately limit its ability to
> represent things in a systematic manner. For example, in your solution,
> how does one make relationships to opposite and relationship?

What of "OK. I've done my part" didn't you get? Received on Sat Apr 29 2006 - 05:50:32 CDT

Original text of this message