Page 1 of 1

help with a database in newlisp

PostPosted: Sat Nov 24, 2018 1:28 pm
by tomtoo
Hi guys,

I need a little help with creating a database with newlisp. I'd like to use "lookup" to search for various things, but I'm not sure how to create the database with all the needed elements. here's the result of what I have now:
Code: Select all
(set 'all-computers '(
  ((atag "444") (person "yyy") (room "") (role nil))))


This does not look right! how can I do something like
Code: Select all
(lookup person all-computers)


and determine atag or "not entered" for room or role?

I'll probably use this for myself, and use it to populate a real database or spreadsheet.

thanks :-)

Re: help with a database in newlisp

PostPosted: Sat Nov 24, 2018 3:28 pm
by HPW
Hello,

You may have a look at nldb from here:

https://github.com/cormullion/newlisp-p ... aster/nldb

You may also find discussions here with a Forum search for 'nldb'

At least you can use 'assoc' on your list.

Or use modules for real databases.

Regards

Re: help with a database in newlisp

PostPosted: Sat Nov 24, 2018 7:54 pm
by tomtoo
thank you I'll have a look.

Re: help with a database in newlisp

PostPosted: Sun Nov 25, 2018 2:46 am
by rickyboy
Here are some archived blog posts on nldb by the author.

Simple database in newLISP
https://newlisper.wordpress.com/2009/01 ... newlisp-2/

Simple database, second attempt
https://newlisper.wordpress.com/2009/01 ... d-attempt/

Updates to nldb
https://newlisper.wordpress.com/2009/09 ... to-nldb-2/

Re: help with a database in newlisp

PostPosted: Sun Nov 25, 2018 9:22 am
by cameyo
The book "A Practical Introduction to Fuzzy Logic using LISP" contains a section that explains the management of csv files (builds a simple CSV library).
The code is written in newLisp.

cameyo