Am 16.11.2016 08:59 schrieb "CILz" <cilz...@cilzone.fr>:
>
> Hello freeemint_,
>
> Thanks for your answer. May be Alexander will be able to give us some
tips.
As we all do.
>
> Regarding my second question, I wonder if we can build Lisp statements
(not Pilog ones) and commit them to the database to translate:
> Person 'Vincent'
>
> LOVES
>
> Person 'Mia'
>
> since '2015'
>
> In other words, can we add a-kind-of 'property' to a relation?
>
> Two my knowledge so far, I know that we can define an 'object' Person
with a 'rel' name and an other rel +Link for 'LOVES' but can we add the
property 'since 2015' to that rel 'LOVES'?
Not directly to my knowledge.

Just create an element for the loves relationship which has +Link-s or rels
to both objects(persons) and store the year in it too. Each person +Link-s
to this relationship struct. Note since we have to store a +Link inside the
person object, a person can only love a single person. For that you might
want to take a look at +Bag or +List. However this construct can also
represent one-sided loves.

The idea us basicly:

[Mara Lin; LOVES] : person
  ^                   I
  I                   V
[p1; p2; +date] : relationship
         I           ^
        V           I
[Edi Ward; LOVES] : person

>
> If so we have a property graph database!!
>
> Best,
> Eric

Best,
freeemint_
>
> Le 16/11/2016 à 08:19, Joh-Tob Schäg a écrit :
>>
>> Hi Eric,
>>
>> i talked about storing Pilog rules in a database with
Regenaxer(Alexander Burger) before. He did it once.
>>
>> I hope that helps.
>> Maybe he still has the source.
>>
>> I do not understand your second question. Can you reformulate it? Maybe
with an example?
>>
>> 2016-11-16 7:59 GMT+01:00 CILz <cilz...@cilzone.fr>:
>>>
>>> Hi Brad,
>>>
>>> In fact we already have "a-kind-of" graph database! Isn't Prolog all
about relation? And Pilog is Prolog on top of PicoLisp, no?
>>>
>>> When we write:
>>>
>>>     (be person (Vincent))
>>>
>>>     (be person (Mia))
>>>
>>>     (be loves (Vincent Mia 2015))
>>>
>>> we define a relation called 'loves' between two 'persons' say 'Vincent'
and 'Mia' which started in '2015'.
>>>
>>> In cypher (Neo4's own query language) I would have written something
like this:
>>>
>>>     create (n:Person {name: {Vincent}})-[:LOVES {since:
{2015}}]->(m:Person {name: {Mia}})
>>>
>>> Hence, as far as I understand PL, we are nearly there. My own open
questions are:
>>>
>>>     1) Can we commit the Pilog statements to the database?
>>>
>>>     2) Can we achieve something equivalent to the Pilog statements
above directly from Lisp side and commit them to the database?
>>>
>>> Best,
>>> Eric
>>>
>>> Le 14/11/2016 à 13:24, Brad Collins a écrit :
>>>>
>>>> A graph database written in picolisp that uses something
>>>> like pilog would be very useful for me as well.
>>>
>>>
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>>
>

Reply via email to