changelog shortlog graph tags branches changeset files revisions annotate raw help

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

changeset 28: 6d54ccb29de4
parent: 8a6b4b2f68cb
child: 1eeeb41ba71d
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 18 Aug 2024 22:16:12 -0400
permissions: -rw-r--r--
description: weekend warrior
1 #+title: A Lispy Database
2 #+options: toc:t h:1
3 #+setupfile: ../../clean.theme
4 #+property: header-args :eval no-export
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 :PROPERTIES:
10 :ID: 2c0c63ba-93f4-4642-9eb3-76bfe6a786d0
11 :END:
12 [[cdn:media/img/sql-architecture.jpg]]
13 
14 
15 The first, and often /only/ choice for this need in companies of
16 today is a SQL RDBMS.
17 
18 The SQL ecosystem has client-server systems like PostgreSQL, and
19 embedded offerings like SQLite. Whatever lang you use you can
20 basically always count on there being SQL support for your DB needs.
21 
22 You might ask yourself, why choose anything else? We all know friendly
23 neighborhood SQL and understand it. Many of us have never used
24 anything else because we /don't need to/. You can represent fairly
25 complex relationships in the RDBMS model and have an ecosystem that
26 supports it wherever you go.
27 
28 My answer is simply - just because SQL is good enough, doesn't mean
29 it's always the best choice. It is designed for Table-oriented data
30 and that is where it should remain according to the CC.
31 
32 * Prolog
33 :PROPERTIES:
34 :ID: a9fa63a6-7427-4f59-8bee-326f74f9a247
35 :END:
36 
37 #+ATTR_HTML: :width 50%
38 [[cdn:media/img/wam.webp]]
39 
40 * Key-Value Stores
41 :PROPERTIES:
42 :ID: 95bef557-d894-4b9e-ab80-c47cd4d9fa2e
43 :END:
44 ** RocksDB
45 :PROPERTIES:
46 :ID: d4d3ad7f-8bd1-4471-b82b-f7a26d7ac050
47 :END:
48 [[cdn:media/img/rocksdb.png]]
49 ** Blobs
50 :PROPERTIES:
51 :ID: 5d0c299e-3efe-4d87-a897-153760fe31f4
52 :END:
53 
54 #+ATTR_HTML: :width 50%
55 [[cdn:media/img/blob.jpg]]
56 
57 * Objects
58 :PROPERTIES:
59 :ID: b98858f9-66bb-4e41-bd84-23e6579fde7b
60 :END:
61 
62 https://courses.cs.northwestern.edu/325/readings/clos.html
63 
64 - [[https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping][ORM]]
65 The ORM maps the object system of your lang to SQL tables, columns and
66 rows and provides an API for you to manipulate the database in a more
67 idiomatic way.
68 
69 [[cdn:media/img/orm.png]]