Declarations: I have now experience in actually using any graph databases.

One could simply store the pilog declarations as lists or symbols in the DB, as 
I understand it, this is what Regenaxer did in the mentioned case.

The other way would be to model the data as pil DB schema, as Joh-Tob mentioned.

In fact the relations (to be exact: the field values, which store the relation) 
in picolisp DB are also objects!

See @lib/db.l for the implementation of +Link.

I guess one could easily use pilDB as a graph database, simply by creating 
additional prefix classes to give +Link additional type information (type of 
the edge, e.g. +Be +Loves +Has +Likes), could also be a prefix class which 
stores an additional numeric cost value (e.g. distance, to model "travel 
distance/cost" to a +Link'ed object). +Link would be a directed connection A -> 
B, while modeling a bidirectional connection could be done by using +Joint.
Add the prefix class +Ref to the mix, then your edges are automatically indexed.

I would not recommend this as a project for pilDB novices, first build 
something simpler to learn how the DB works and is to be used.

Greetings, beneroth

----- Original Message -----
From: Alexander Burger []
Sent: Wed, 16 Nov 2016 16:09:51 +0100
Subject: Re: First post

On Wed, Nov 16, 2016 at 03:52:02PM +0100, Joh-Tob Schäg wrote:
> Just out of curiosity:
> Is there a more elegant way to have links with properties than the way i
> mentioned?

No, looks good. The person objects are connected via +Link's or
+Joint's, and may of course have properties like a year or simply a
+Date. Also, your note about a (+List +Link) etc. is all right.

♪♫ Alex

Reply via email to