Skip to content

Database Cheat Sheet for 20+ Engines

7 min readDatabasesSpinDB

Here's every database engine the Layerbase CLI supports, what each one does, and when to pick it. Bookmark this page and come back whenever you're choosing an engine for a new project.

Install the Layerbase CLI

Every engine below runs locally with a single command. The Layerbase CLI is the open-source tool formerly called SpinDB, now shipped as the layerbase npm package with the lbase binary. Install it first:

bash
npm i -g layerbase

Then create any engine with lbase create <name> -e <engine> --start. Each section below includes the exact command.

Relational

PostgreSQL

The generalist. Extensions for full-text search, JSON, geospatial, and more. If you're unsure which database to use, start here.

Best for: general-purpose applications, complex queries, any workload that benefits from strong ACID guarantees.

bash
lbase create pg1 -e postgresql --start

What's new in PostgreSQL 18 | Docs

MySQL

The most widely deployed relational database. Massive ecosystem of tools, hosting providers, and community knowledge.

Best for: read-heavy web applications, WordPress/PHP stacks, and projects where ecosystem breadth matters.

bash
lbase create mysql1 -e mysql --start

Getting started with MySQL | Docs

MariaDB

A MySQL fork with extras: sequences, temporal tables, system-versioned rows, and the Aria storage engine. Drop-in compatible with MySQL in most cases.

Best for: MySQL workloads that need temporal queries, sequences, or Oracle-to-open-source migrations.

bash
lbase create maria1 -e mariadb --start

Getting started with MariaDB | Docs

CockroachDB

Distributed PostgreSQL. Spreads data across nodes automatically with strong consistency. Survives node and region failures without manual intervention.

Best for: globally distributed applications that need horizontal scaling with PostgreSQL compatibility.

bash
lbase create crdb1 -e cockroachdb --start

Getting started with CockroachDB | Docs

Document

MongoDB

The most popular document database. Flexible schemas, a rich query API, and aggregation pipelines for complex transformations.

Best for: applications with evolving schemas, nested/hierarchical data, or rapid prototyping where schema flexibility matters.

bash
lbase create mongo1 -e mongodb --start

Getting started with MongoDB | Docs

FerretDB

The MongoDB API running on top of PostgreSQL. Gives you MongoDB's query language with PostgreSQL's storage and reliability. Fully open-source.

Best for: teams that want MongoDB compatibility without the SSPL license, or that want to use existing PostgreSQL infrastructure.

bash
lbase create ferret1 -e ferretdb --start

Getting started with FerretDB | Docs

CouchDB

An HTTP-native document database with built-in multi-master replication. Syncs data between nodes (or between server and client) with automatic conflict resolution.

Best for: offline-first applications, multi-datacenter replication, and scenarios where devices need to sync data reliably.

bash
lbase create couch1 -e couchdb --start

Getting started with CouchDB | Docs

Key-Value / Cache

Redis

An in-memory data structure store with sub-millisecond latency. Supports strings, lists, sets, sorted sets, hashes, streams, and more. Far more than a simple cache.

Best for: caching, session storage, rate limiting, leaderboards, real-time counters, and pub/sub messaging.

bash
lbase create redis1 -e redis --start

Getting started with Redis | Docs

Valkey

An open-source fork of Redis (Linux Foundation) using the same wire protocol. Compatible with Redis clients and commands.

Best for: the same workloads as Redis, for teams that prefer a BSD-licensed alternative.

bash
lbase create valkey1 -e valkey --start

Getting started with Valkey | Docs

Meilisearch

A typo-tolerant, full-text search engine with sub-50ms response times out of the box. Zero configuration needed for relevance.

Best for: user-facing search bars, autocomplete, product search, and any feature where typo tolerance and speed matter.

bash
lbase create meili1 -e meilisearch --start

Getting started with Meilisearch | Docs

Qdrant

A vector database for similarity search. Store embeddings and query by semantic meaning rather than keywords.

Best for: semantic search, recommendation engines, RAG pipelines, image similarity, and anomaly detection.

bash
lbase create qdrant1 -e qdrant --start

Getting started with Qdrant | Docs

Weaviate

A vector database with built-in vectorizer modules. Supports hybrid search (vector + keyword) and integrates with OpenAI, Cohere, and Hugging Face for automatic embedding.

Best for: hybrid search, multimodal search (text + images), and applications that want vectorization handled by the database.

bash
lbase create weav1 -e weaviate --start

Getting started with Weaviate | Docs

Time Series

QuestDB

A time-series database that speaks SQL. The SAMPLE BY clause aggregates time-series data in one line. Columnar storage with high ingestion throughput.

Best for: IoT sensor data, application metrics, financial tick data, and any workload with timestamped append-only data.

bash
lbase create quest1 -e questdb --start

Getting started with QuestDB | Docs

InfluxDB

A time-series database with its own Flux query language and built-in retention policies that automatically expire old data.

Best for: infrastructure monitoring, application metrics, and time-series workloads that need automatic data lifecycle management.

bash
lbase create influx1 -e influxdb --start

Getting started with InfluxDB | Docs

Analytics

ClickHouse

A columnar database built for analytical queries at massive scale. Vectorized execution processes billions of rows per second.

Best for: real-time dashboards, log analytics, event tracking, and any workload that aggregates large datasets.

bash
lbase create click1 -e clickhouse --start

Getting started with ClickHouse | Docs

DuckDB

An embedded analytical database. Think SQLite, but for OLAP. Runs in-process with no server. The Layerbase CLI exposes it through a PostgreSQL-compatible proxy.

Best for: local analytics, data science workflows, CSV/Parquet file querying, and replacing pandas for SQL-native analysis.

bash
lbase create duck1 -e duckdb --start

Getting started with DuckDB | Docs

Embedded

SQLite

A single-file database with zero configuration. No server, no daemon. The most deployed database engine in the world. The Layerbase CLI exposes it through a PostgreSQL-compatible proxy.

Best for: local-first apps, embedded systems, CLI tools, prototyping, and any application where simplicity beats scalability.

bash
lbase create sqlite1 -e sqlite --start

Getting started with SQLite | Docs

LibSQL

A fork of SQLite that adds server mode, replication, and vector search extensions. Backwards-compatible with SQLite files.

Best for: SQLite workloads that need a server mode, multi-client access, edge replication, or built-in vector search.

bash
lbase create libsql1 -e libsql --start

Getting started with LibSQL | Docs

Multi-Model

SurrealDB

A multi-model database combining document, graph, and relational paradigms in one engine. Uses its own query language (SurrealQL) with graph traversals, record links, and schema flexibility.

Best for: applications that need graph traversals alongside document storage without running separate databases.

bash
lbase create surreal1 -e surrealdb --start

Getting started with SurrealDB | Docs

Specialized

TypeDB

A database for knowledge graphs with a type system and built-in inference rules. Define logical rules and TypeDB derives new facts automatically.

Best for: knowledge graphs, drug discovery pipelines, fraud detection, and any domain where you need to reason over relationships.

bash
lbase create typedb1 -e typedb --start

Getting started with TypeDB | Docs

TigerBeetle

A purpose-built financial transaction database. Designed for double-entry bookkeeping with strict consistency guarantees and zero-copy I/O.

Best for: ledgers, payment systems, account balances, and any workload where financial correctness is non-negotiable.

bash
lbase create tiger1 -e tigerbeetle --start

Getting started with TigerBeetle | Docs

Quick Reference Table

EngineCategoryCLI FlagDefault Portnpm Package
PostgreSQLRelational-e postgresql5432pg
MySQLRelational-e mysql3306mysql2
MariaDBRelational-e mariadb3306mariadb
CockroachDBRelational-e cockroachdb26257pg
MongoDBDocument-e mongodb27017mongodb
FerretDBDocument-e ferretdb27017mongodb
CouchDBDocument-e couchdb5984nano
RedisKey-Value-e redis6379redis
ValkeyKey-Value-e valkey6379redis
MeilisearchSearch-e meilisearch7700meilisearch
QdrantSearch-e qdrant6333@qdrant/js-client-rest
WeaviateSearch-e weaviate8080weaviate-client
QuestDBTime Series-e questdb8812pg
InfluxDBTime Series-e influxdb8086@influxdata/influxdb-client
ClickHouseAnalytics-e clickhouse8123@clickhouse/client
DuckDBAnalytics-e duckdb5432 (PG proxy)pg
SQLiteEmbedded-e sqlite5432 (PG proxy)pg
LibSQLEmbedded-e libsql8080@libsql/client
SurrealDBMulti-Model-e surrealdb8000surrealdb
TypeDBSpecialized-e typedb1729typedb-driver
TigerBeetleSpecialized-e tigerbeetle3001tigerbeetle-node

Wrapping Up

Every engine above runs locally with lbase create <name> -e <engine> --start and connects with a standard npm package. No Docker, no manual binary downloads.

Need a managed instance instead? Layerbase Cloud provisions any of these engines in seconds. Or grab Layerbase Desktop for a GUI over SpinDB.

bash
lbase list        # see all running instances
lbase url <name>  # get the connection string
lbase stop <name> # stop an instance
lbase start <name> # restart it

Read more at layerbase.com/docs/cli.