> ## Documentation Index
> Fetch the complete documentation index at: https://moridb.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Supported database engines, wire protocols, and implementation details.

Mori supports 9 database engines across SQL, NoSQL, and embedded categories. Each engine uses the real wire protocol -- your application connects to Mori with its standard driver, no code changes required.

## Engine Matrix

| Engine                              | Category | Wire Protocol    | Default Port | Shadow Strategy    | Status     |
| ----------------------------------- | -------- | ---------------- | ------------ | ------------------ | ---------- |
| [PostgreSQL](/docs/engines/postgres)     | SQL      | pgwire v3        | 5432         | Docker container   | **Stable** |
| [CockroachDB](/docs/engines/cockroachdb) | SQL      | pgwire v3        | 26257        | Docker container   | **Stable** |
| [MySQL](/docs/engines/mysql)             | SQL      | MySQL wire       | 3306         | Docker container   | Supported  |
| [MariaDB](/docs/engines/mariadb)         | SQL      | MySQL wire       | 3306         | Docker container   | Supported  |
| [MS SQL Server](/docs/engines/mssql)     | SQL      | TDS              | 1433         | Docker container   | Supported  |
| [SQLite](/docs/engines/sqlite)           | Embedded | pgwire (exposed) | N/A          | Local file copy    | Supported  |
| [DuckDB](/docs/engines/duckdb)           | Embedded | pgwire (exposed) | N/A          | Local file copy    | Supported  |
| [Redis](/docs/engines/redis)             | NoSQL    | RESP             | 6379         | Docker container   | Supported  |
| [Firestore](/docs/engines/firestore)     | NoSQL    | gRPC             | N/A          | Emulator container | Supported  |

## By Category

### SQL Engines (pgwire)

PostgreSQL and CockroachDB speak the pgwire v3 protocol. Mori uses `pg_query_go` (PostgreSQL's actual parser internals) for AST-based query classification. These engines have the most mature proxy implementation with full extended query protocol support and zero known limitations.

CockroachDB reuses the entire PostgreSQL engine — it's a thin adapter that overrides only the engine ID. All proxy logic, classification, and merging is shared.

### SQL Engines (MySQL wire)

MySQL and MariaDB use the MySQL wire protocol. Mori uses `vitess/sqlparser` for AST-based classification. MariaDB reuses the MySQL engine — the key difference is that MariaDB uses a `mariadb:` Docker image for the shadow container and supports `RETURNING` on 10.5+.

### SQL Engines (TDS)

MS SQL Server speaks the TDS (Tabular Data Stream) protocol. Mori uses regex-based classification for T-SQL since no Go-native TDS parser exists. Supports `sp_executesql` RPC calls alongside standard SQL batches.

### Embedded Engines

SQLite and DuckDB are embedded databases (no server process). Mori exposes them over the pgwire protocol so applications can connect with any PostgreSQL driver. The shadow is a full file copy rather than a Docker container — no Docker needed.

### NoSQL Engines

Redis uses the RESP protocol with a command-based classifier (\~155 Redis commands mapped). Firestore uses gRPC with a method-name classifier. Both support full copy-on-write semantics with delta tracking at the key/document level.

<Info>
  All engines share the same copy-on-write model: reads from prod, writes to shadow, transparent merging. The wire protocol and classification strategy differ per engine, but the [core invariants](/docs/concepts/safety) are identical.
</Info>
