help with a database in newlisp

Q&A's, tips, howto's

help with a database in newlisp

Postby tomtoo » Sat Nov 24, 2018 1:28 pm

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 :-)
tomtoo
 
Posts: 46
Joined: Wed Oct 28, 2009 10:00 pm

Re: help with a database in newlisp

Postby HPW » Sat Nov 24, 2018 3:28 pm

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
HPW
 
Posts: 1352
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany

Re: help with a database in newlisp

Postby tomtoo » Sat Nov 24, 2018 7:54 pm

thank you I'll have a look.
tomtoo
 
Posts: 46
Joined: Wed Oct 28, 2009 10:00 pm

Re: help with a database in newlisp

Postby rickyboy » Sun Nov 25, 2018 2:46 am

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)
rickyboy
 
Posts: 554
Joined: Fri Apr 08, 2005 7:13 pm
Location: Front Royal, Virginia

Re: help with a database in newlisp

Postby cameyo » Sun Nov 25, 2018 9:22 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
cameyo
 
Posts: 15
Joined: Sun Mar 27, 2011 3:07 pm


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests