Re: Database question

2019-04-17 Thread C K Kashyap
I was going over https://software-lab.de/doc/tut.html#db and looks like I should just go with the Entity/Relation model. Thanks Alex. On Tue, Apr 16, 2019 at 10:15 PM Alexander Burger wrote: > On Tue, Apr 16, 2019 at 03:57:14PM -0700, C K Kashyap wrote: > > Thanks Joh-Tob, > > I think

Re: Database question

2019-04-16 Thread Alexander Burger
On Tue, Apr 16, 2019 at 03:57:14PM -0700, C K Kashyap wrote: > Thanks Joh-Tob, > I think properties work for me. I was thinking that symbol would map to > "key" but that need not be the case. My goal is to figure out a way to > store records that are 4 tuple - "Entity name", "Attribute", "Value",

Re: Database question

2019-04-16 Thread Alexander Burger
Hi Kashyap, > I tried to implement key-value store/get. I am > not sure how to enumerate all the keys though. A key/value storage can be done very easily. > (pool "test.db") You store values under keys directly in the DB root object by passing NIL as the tree: (store NIL "KEY" "VALUE")

Re: Database question

2019-04-16 Thread C K Kashyap
> > > > > > Ursprüngliche Nachricht > > > > Von: ckkash...@gmail.com > Gesendet: 16. April 2019 16:42 > An: picolisp@software-lab.de > Antworten: picolisp@software-lab.de > Betreff: Re: Database question > > > Hi Alex, > > >

Re: Database question

2019-04-16 Thread Joh-Tob Schäg
;Root" ? If you want to get the complete property list of any symbol (internal or in the DB) just call 'getl on it   Ursprüngliche Nachricht   Von: ckkash...@gmail.com Gesendet: 16. April 2019 16:42 An: picolisp@software-lab.de Antworten: picolisp@software-lab.de Betreff: Re

Re: Database question

2019-04-16 Thread C K Kashyap
Hi Alex, Does this look reasonable? I tried to implement key-value store/get. I am not sure how to enumerate all the keys though. (pool "test.db") (set *DB "ROOT") (de kv-add (k v) (let nv (new T) (set nv v) (put *DB k nv)

Re: Database question

2019-04-14 Thread Alexander Burger
On Sun, Apr 14, 2019 at 12:54:19PM -0700, C K Kashyap wrote: > Is the builtin database in picolisp tied to OOP? The documentation seems to > indicate it. Not necessarily. The DB consists of three independent layers. Persistent "external" symbols are the base. They are directly in the core

Database question

2019-04-14 Thread C K Kashyap
Hi, Is the builtin database in picolisp tied to OOP? The documentation seems to indicate it. Is there a way I could use the DB to just accrue immutable facts (just like Clojure Datomic works)? Is there a non-OOP sample that I could use as a starting point? Regards, Kashyap

Re: Order by database question

2017-05-01 Thread Henrik Sarvell
Hi Alex thanks, I suspected that the fact that I was scanning two separate indexes prevented proper ordering - from reading the select tutorial (very good piece that one) - but I wanted to confirm. Added Aux and just replaced the select with your db line and it works. On Mon, May 1, 2017 at

Re: Order by database question

2017-05-01 Thread Alexander Burger
Hi Henrik, > (class +UrlTag +Macropisobj) > (rel id(+Key +Number)) > (rel url (+Ref +Link) NIL (+Url)) > (rel usr (+Ref +Link) NIL (+User)) > (rel tag (+Aux +Ref +Link) (usr) NIL (+Tag)) > ... > SELECT * FROM UrlTag WHERE usr = Usr ORDER BY id DESC LIMIT 0,50 > > I

Re: Order by database question

2017-04-30 Thread Joh-Tob Schäg
That could be because of +Key. Am 01.05.2017 02:18 schrieb "Henrik Sarvell" : > Hi list, > > I've been looking through the docs and all my notes but it looks like I'm > not managing to get the result I want no matter how I try. > > I've got this E/R: > > (class +UrlTag

Order by database question

2017-04-30 Thread Henrik Sarvell
Hi list, I've been looking through the docs and all my notes but it looks like I'm not managing to get the result I want no matter how I try. I've got this E/R: (class +UrlTag +Macropisobj) (rel id(+Key +Number)) (rel url (+Ref +Link) NIL (+Url)) (rel usr (+Ref +Link) NIL