BayesDB

discontinued

by MIT Probabilistic Computing Project · since 2013 · also known as bayeslite, Bayesian Query Language, BQL

MIT research 'Bayesian database' that answers probabilistic questions about tables via BQL on SQLite.

relationalresearch prototypeopen source (permissive)legacy

discontinued. MIT ProbComp research prototype; no commits since April 2020 and the project page is offline. Ideas continue in the lab's GenSQL work.

Overview

BayesDB was a research system from MIT's Probabilistic Computing Project that let users ask what their data probably implies, not just what it contains. Its Bayesian Query Language (BQL) extended SQL with statements to estimate dependence between columns, infer missing values, simulate plausible new rows and find statistically similar records, backed by automatically learned generative models (initially CrossCat). The first implementation (2013) was replaced by bayeslite, a Python library that stores data and models inside SQLite and was distributed through PyPI and Anaconda. The authors always labelled it experimental; the last code change was in April 2020, the project page is gone, and the lab's later work moved to GenSQL.

Strengths & trade-offs

Strengths

  • +SQL-like statements for inference: dependence probabilities, imputation, simulation, similarity
  • +Generative models are learned automatically, so no statistics expertise is needed to start
  • +Everything lives in a single SQLite file alongside the data
  • +Influential example of probabilistic programming inside a database

Trade-offs

  • −Explicitly experimental; authors warned behaviour would change and data handling was not secure
  • −Unmaintained since 2020 and tied to old Python dependencies
  • −Model training is slow and single-machine

Great for

  • +Teaching and research on probabilistic databases
  • +Exploratory analysis of small tabular datasets with missing values
  • +Reproducing published BayesDB/CrossCat results

Think twice for

  • −Production data science pipelines
  • −Large datasets or real-time inference

Capabilities

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

✓Transactions
✓Joins
✓Durable persistence
–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
Full ACID
Consistency
Strong
Schema
Strict
Architecture
Embedded, Single node
Query languages
BQL (Bayesian Query Language), SQL

Model fitting is compute-heavy and runs on one machine; suited to tables of thousands to low millions of rows.

Deployment

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

Ecosystem

compatible withSQLite
apis & protocolsPython API
client languagesPython

Alternatives to BayesDB

Compare all→
DuckDBColumnar / OLAP63.7

In-process columnar SQL database: the SQLite of analytics, running inside your app or notebook.

bayesdb vs duckdb →
SQLiteRelational75.5

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

bayesdb vs sqlite →
PostgreSQLRelational93.2

The extensible, standards-first open-source relational database.

bayesdb vs postgresql →
IBM NetezzaRelational15.1

IBM's FPGA-accelerated MPP warehouse, now offered as NPS on-prem, in Cloud Pak and as a service.

bayesdb vs ibm-netezza →
MondrianRelational12.4

Java ROLAP engine that answers MDX queries by generating SQL against your relational warehouse.

bayesdb vs mondrian →
GenomicsDBArray / Scientific4.2

Sparse-array store for genomic variant data, built on TileDB and shipped inside GATK4.

bayesdb vs genomicsdb →

BayesDB FAQ

What is BayesDB?

BayesDB is a relational database by MIT Probabilistic Computing Project, first released in 2013. BayesDB was a research system from MIT's Probabilistic Computing Project that let users ask what their data probably implies, not just what it contains. Its Bayesian Query Language (BQL) extended SQL with statements to estimate dependence between columns, infer missing values, simulate plausible new rows and find statistically similar records, backed by automatically learned generative models (initially CrossCat). The first implementation (2013) was replaced by bayeslite, a Python library that stores data and models inside SQLite and was distributed through PyPI and Anaconda. The authors always labelled it experimental; the last code change was in April 2020, the project page is gone, and the lab's later work moved to GenSQL.

Is BayesDB open source?

Yes. BayesDB is open source. License: Apache License 2.0.

Does BayesDB support ACID transactions?

Yes. BayesDB supports full ACID transactions, with strong consistency.

Does BayesDB scale horizontally?

BayesDB 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).

How can I run BayesDB?

You can self-host it and embed it in your application.

What is BayesDB best for?

BayesDB is a strong fit for teaching and research on probabilistic databases; exploratory analysis of small tabular datasets with missing values; and reproducing published BayesDB/CrossCat results. Think twice for production data science pipelines.

What are the best alternatives to BayesDB?

Common alternatives to BayesDB include DuckDB, SQLite, PostgreSQL, IBM Netezza and Mondrian. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is BayesDB still maintained?

BayesDB is discontinued. MIT ProbComp research prototype; no commits since April 2020 and the project page is offline. Ideas continue in the lab's GenSQL work.

How popular is BayesDB?

BayesDB ranks #479 of 844 databases on the WhichDB Score (2.3/100), and #151 among relational databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.