help with a database in newlisp

Q&A's, tips, howto's
Locked
tomtoo
Posts: 46
Joined: Wed Oct 28, 2009 10:00 pm

help with a database in newlisp

Post 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 :-)

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Re: help with a database in newlisp

Post 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
Hans-Peter

tomtoo
Posts: 46
Joined: Wed Oct 28, 2009 10:00 pm

Re: help with a database in newlisp

Post by tomtoo »

thank you I'll have a look.

rickyboy
Posts: 607
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: help with a database in newlisp

Post 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/
(λx. x x) (λx. x x)

cameyo
Posts: 183
Joined: Sun Mar 27, 2011 3:07 pm
Location: Italy
Contact:

Re: help with a database in newlisp

Post 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

Locked