changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > blog / draft/a-lispy-database.org

changeset 22: 8a6b4b2f68cb
parent: 1204cefcfd28
child: 6d54ccb29de4
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 16 Jun 2024 01:14:25 -0400
permissions: -rw-r--r--
description: clean
1 #+title: A Lispy Database
2 #+options: toc:t h:1
3 #+setupfile: ../../clean.theme
4 
5 One of the key features missing in the Compiler Company [[https://vc.compiler.company/comp/core][core]] is a
6 reliable [[https://en.wikipedia.org/wiki/Category:Database_management_systems][DBMS]]. It's something that I've worked towards in Rust, and
7 now in Common Lisp, but haven't gotten to a production-ready state.
8 * SQL
9 [[cdn:media/img/sql-architecture.jpg]]
10 
11 
12 The first, and often /only/ choice for this need in companies of
13 today is a SQL RDBMS.
14 
15 The SQL ecosystem has client-server systems like PostgreSQL, and
16 embedded offerings like SQLite. Whatever lang you use you can
17 basically always count on there being SQL support for your DB needs.
18 
19 You might ask yourself, why choose anything else? We all know friendly
20 neighborhood SQL and understand it. Many of us have never used
21 anything else because we /don't need to/. You can represent fairly
22 complex relationships in the RDBMS model and have an ecosystem that
23 supports it wherever you go.
24 
25 My answer is simply - just because SQL is good enough, doesn't mean
26 it's always the best choice. It is designed for Table-oriented data
27 and that is where it should remain according to the CC.
28 
29 * Prolog
30 
31 #+ATTR_HTML: :width 50%
32 [[cdn:media/img/wam.webp]]
33 
34 * Key-Value Stores
35 ** RocksDB
36 [[cdn:media/img/rocksdb.png]]
37 ** Blobs
38 
39 #+ATTR_HTML: :width 50%
40 [[cdn:media/img/blob.jpg]]
41 
42 * Objects
43 
44 https://courses.cs.northwestern.edu/325/readings/clos.html
45 
46 - [[https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping][ORM]]
47 The ORM maps the object system of your lang to SQL tables, columns and
48 rows and provides an API for you to manipulate the database in a more
49 idiomatic way.
50 
51 [[cdn:media/img/orm.png]]