newLISP Fan Club

Forum => newLISP in the real world => Topic started by: tomtoo on November 24, 2018, 05:28:45 AM

Title: help with a database in newlisp
Post by: tomtoo on November 24, 2018, 05:28:45 AM
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:

(set 'all-computers '(
  ((atag "444") (person "yyy") (room "") (role nil))))


This does not look right! how can I do something like
(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 :-)
Title: Re: help with a database in newlisp
Post by: HPW on November 24, 2018, 07:28:31 AM
Hello,



You may have a look at nldb from here:



https://github.com/cormullion/newlisp-projects/tree/master/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
Title: Re: help with a database in newlisp
Post by: tomtoo on November 24, 2018, 11:54:23 AM
thank you I'll have a look.
Title: Re: help with a database in newlisp
Post by: rickyboy on November 24, 2018, 06:46:28 PM
Here are some archived blog posts on nldb by the author.



Simple database in newLISP

https://newlisper.wordpress.com/2009/01/30/simple-database-in-newlisp-2/



Simple database, second attempt

https://newlisper.wordpress.com/2009/01/30/simple-database-second-attempt/



Updates to nldb

https://newlisper.wordpress.com/2009/09/12/updates-to-nldb-2/
Title: Re: help with a database in newlisp
Post by: cameyo on November 25, 2018, 01:22:41 AM
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