pocketSQL

discontinued

by Steve Grubb · since 2001

Steve Grubb's compact embeddable SQL engine for shell scripts and C programs (2001–2002); abandoned.

relationalembedded libraryopen source (copyleft)legacy

discontinued. Unmaintained since about 2002; the sgpr.net project page is now a parked domain. SQLite is the obvious replacement.

Overview

pocketSQL was a compact, multiuser SQL database by Steve Grubb (author of the Ploticus charting tool) designed to be linked straight into programs or driven from the shell rather than run as a server. It provided a simple C API, a command-line interface named psql (unrelated to PostgreSQL's), web access through his cgipal tool, a subset of SQL with SELECT INTO, joins, GROUP BY and ORDER BY, plus extensions to pipe results to shell commands and read ordinary files as tables, with file-level locking and transaction logging. It deliberately skipped indexing, logins and network access: processes had to share the data's file system and UID. The project dates from about 2001–2002 and its site is now a parked domain; use SQLite instead.

Strengths & trade-offs

Strengths

  • +Shell-friendly design: SQL results can pipe into commands and read plain files
  • +Tiny library that links directly into C programs

Trade-offs

  • −No indexes, logins or network access
  • −Abandoned around 2002 and hard to find today

Great for

  • +Historical reference for script-oriented embedded SQL
  • +Comparing early embedded SQL designs with SQLite

Think twice for

  • −Any new project

Capabilities

Native or official first-party support · 2 of 25 tracked

✓Joins
✓Durable persistence
–Transactions
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–JSON
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–In-memory
–Compression
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
None
Consistency
Strong
Schema
Strict
Architecture
Embedded
Query languages
SQL

No indexes, so practical only for small tables.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsC API, psql command line
client languagesC

Alternatives to pocketSQL

Compare all→
SQLiteRelational75.5

The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.

pocketsql vs sqlite →
Oracle Berkeley DBKey-Value17.0

The 1990s-era embedded key-value library, now Oracle-owned, AGPL-licensed and rarely updated.

pocketsql vs berkeley-db →
H2 DatabaseRelational23.5

Fast pure-Java SQL engine for embedded, in-memory and test databases, with compatibility modes.

pocketsql vs h2 →
Microsoft AccessRelational45.8

Desktop database and forms builder bundled with Microsoft 365; still everywhere in back offices.

pocketsql vs microsoft-access →
FirebirdRelational32.8

Lightweight, MVCC relational database from the InterBase lineage, embeddable or client-server.

pocketsql vs firebird →
HyperSQL (HSQLDB)Relational9.4

Long-running pure-Java SQL database with strong SQL:2023 coverage, used embedded and in LibreOffice.

pocketsql vs hsqldb →

pocketSQL FAQ

What is pocketSQL?

pocketSQL is a relational database by Steve Grubb, first released in 2001. pocketSQL was a compact, multiuser SQL database by Steve Grubb (author of the Ploticus charting tool) designed to be linked straight into programs or driven from the shell rather than run as a server. It provided a simple C API, a command-line interface named psql (unrelated to PostgreSQL's), web access through his cgipal tool, a subset of SQL with SELECT INTO, joins, GROUP BY and ORDER BY, plus extensions to pipe results to shell commands and read ordinary files as tables, with file-level locking and transaction logging. It deliberately skipped indexing, logins and network access: processes had to share the data's file system and UID. The project dates from about 2001–2002 and its site is now a parked domain; use SQLite instead.

Is pocketSQL open source?

Yes. pocketSQL is open source. License: GNU GPL v2.

Does pocketSQL support ACID transactions?

No. pocketSQL does not provide ACID transactions; its consistency model is strong.

Does pocketSQL scale horizontally?

pocketSQL does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

What is pocketSQL best for?

pocketSQL is a strong fit for historical reference for script-oriented embedded SQL and comparing early embedded SQL designs with SQLite. Think twice for any new project.

What are the best alternatives to pocketSQL?

Common alternatives to pocketSQL include SQLite, Oracle Berkeley DB, H2 Database, Microsoft Access and Firebird. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is pocketSQL still maintained?

pocketSQL is discontinued. Unmaintained since about 2002; the sgpr.net project page is now a parked domain. SQLite is the obvious replacement.

How popular is pocketSQL?

pocketSQL has little measurable public adoption today, so it ranks near the bottom of the WhichDB Score.