Database Cheat Sheet for 20+ Engines
Here's every database engine SpinDB 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 SpinDB
Every engine below runs locally with a single command. Install SpinDB first:
npm i -g spindbThen create any engine with spindb 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.
spindb create pg1 -e postgresql --startWhat'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.
spindb create mysql1 -e mysql --startGetting 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.
spindb create maria1 -e mariadb --startGetting 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.
spindb create crdb1 -e cockroachdb --startGetting 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.
spindb create mongo1 -e mongodb --startGetting 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.
spindb create ferret1 -e ferretdb --startGetting 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.
spindb create couch1 -e couchdb --startGetting 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.
spindb create redis1 -e redis --startGetting 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.
spindb create valkey1 -e valkey --startGetting started with Valkey | Docs
Search
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.
spindb create meili1 -e meilisearch --startGetting 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.
spindb create qdrant1 -e qdrant --startGetting 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.
spindb create weav1 -e weaviate --startGetting 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.
spindb create quest1 -e questdb --startGetting 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.
spindb create influx1 -e influxdb --startGetting 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.
spindb create click1 -e clickhouse --startGetting started with ClickHouse | Docs
DuckDB
An embedded analytical database. Think SQLite, but for OLAP. Runs in-process with no server. SpinDB 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.
spindb create duck1 -e duckdb --startGetting 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. SpinDB exposes it through a PostgreSQL-compatible proxy.
Best for: local-first apps, embedded systems, CLI tools, prototyping, and any application where simplicity beats scalability.
spindb create sqlite1 -e sqlite --startGetting 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.
spindb create libsql1 -e libsql --startGetting 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.
spindb create surreal1 -e surrealdb --startGetting 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.
spindb create typedb1 -e typedb --startGetting 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.
spindb create tiger1 -e tigerbeetle --startGetting started with TigerBeetle | Docs
Quick Reference Table
| Engine | Category | SpinDB Flag | Default Port | npm Package |
|---|---|---|---|---|
| PostgreSQL | Relational | -e postgresql | 5432 | pg |
| MySQL | Relational | -e mysql | 3306 | mysql2 |
| MariaDB | Relational | -e mariadb | 3306 | mariadb |
| CockroachDB | Relational | -e cockroachdb | 26257 | pg |
| MongoDB | Document | -e mongodb | 27017 | mongodb |
| FerretDB | Document | -e ferretdb | 27017 | mongodb |
| CouchDB | Document | -e couchdb | 5984 | nano |
| Redis | Key-Value | -e redis | 6379 | redis |
| Valkey | Key-Value | -e valkey | 6379 | redis |
| Meilisearch | Search | -e meilisearch | 7700 | meilisearch |
| Qdrant | Search | -e qdrant | 6333 | @qdrant/js-client-rest |
| Weaviate | Search | -e weaviate | 8080 | weaviate-client |
| QuestDB | Time Series | -e questdb | 8812 | pg |
| InfluxDB | Time Series | -e influxdb | 8086 | @influxdata/influxdb-client |
| ClickHouse | Analytics | -e clickhouse | 8123 | @clickhouse/client |
| DuckDB | Analytics | -e duckdb | 5432 (PG proxy) | pg |
| SQLite | Embedded | -e sqlite | 5432 (PG proxy) | pg |
| LibSQL | Embedded | -e libsql | 8080 | @libsql/client |
| SurrealDB | Multi-Model | -e surrealdb | 8000 | surrealdb |
| TypeDB | Specialized | -e typedb | 1729 | typedb-driver |
| TigerBeetle | Specialized | -e tigerbeetle | 3001 | tigerbeetle-node |
Wrapping Up
Every engine above runs locally with spindb 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.
spindb list # see all running instances
spindb url <name> # get the connection string
spindb stop <name> # stop an instance
spindb start <name> # restart itRead more at layerbase.com/spindb.