Introduction to the PicoLisp Database

Data Types in PicoLisp — revisited

cell
|
+-----------+-----------+
| | |
Number Symbol Pair
|
|
+--------+-----------+-----------+
| | | |
NIL Internal Transient External
  • NIL is a special symbol which exists exactly once and is used for various purposes (we have seen many of them already) - like representing an empty list or a boolean "false".
  • Internal Symbols are basically all symbols that we have seen so far: variable names, function definitions… There cannot be two different symbols with the same name because they are indexed by their name.
  • Transient Symbols are only interned for a certain time and released after that, which means that they cannot be accessed by their name. For example: anonymous objects without names, text strings…
  • And finally External Symbols: External symbols reside in an external resource (usually a database file) and are loaded into memory — and written back to the file — dynamically. They are kept in memory (“cached”) as long as they are accessible.

Characteristics of external symbols

The PicoLisp Database

  • Object-Oriented: The PicoLisp database directly supports object-oriented programming, which means that the application objects can be easily persisted.
  • Document-based: Each record can have its own specific schema, similarly to the folder-structure on a PC.
  • Graph-based: The records can be directly interlinked to define the relationships between the entities.
  • scalar (like “is a string”, “number”, “date”…),
  • object-to-object (uni-, bidirectional or hooks),
  • containers for other entities (like lists),
  • various indexing possibilities (unique keys, full-text…),
  • Blobs (binary large objects).

Why should I use the PicoLisp database?

  • Higher productivity: The “object” or “table” definition needs to be done only once (instead of several times, like in the databasse schema, application class, business class…),
  • Less code, less space for bugs,
  • Simpler mental model,
  • Performance increase since the data is cached on the application layer
  • full ACID support (atomicity, consistency, isolation, durability).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mia Temma

Mia Temma

These are cross-posts from my blog https://picolisp-explored.com. I’m writing about PicoLisp for beginners. Welcome!