How to Define Entities and Relationships in the PicoLisp Database

Some basic vocabulary

An example

(class +Person +Entity)
(rel name (+Need +Sn +Idx +String))
(rel job (+Ref +String))             
(rel birthday (+Ref +Date))
(rel deathday (+Ref +Date))
(rel info (+String))
(class +Man +Person)
(class +Woman +Person)
  • +Link: an uni-directional link to some other entity,
  • +Joint: a bi-directional link to some other entity,
  • +Hook: a reference to an entity holding object-local index trees.
(rel partner (+Joint) partner (+Person))
(rel father (+Joint) kids (+Man))
(rel mother (+Joint) kids (+Woman))
(class +Man +Person)
(rel kids (+List +Joint) father (+Person))
(class +Woman +Person)
(rel kids (+List +Joint) mother (+Person))

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mia Temma

Mia Temma

These are cross-posts from my blog https://picolisp-explored.com. I’m writing about PicoLisp for beginners. Welcome!