Dolt: Git-Style Version Control for SQL Databases

Better Stackgo watch the original →

Dolt brings Git-style branching, diffing, and merging to relational databases, allowing developers to track row-level changes in SQL tables instead of relying on flat files or audit logs.

The Breakthrough

Dolt enables Git-style version control for relational data, allowing users to perform operations like branching, committing, and merging directly on SQL tables while maintaining standard database features like indexes and schema constraints.

What Actually Worked

  • Command-line parity: Users interact with the database using familiar Git commands such as dolt branch, dolt diff, dolt commit, and dolt merge to manage data states.
  • Row-level diffing: Unlike Git, which tracks file changes, Dolt tracks changes at the row and column level, displaying the specific old and new values for modified records.
  • Prolly Tree storage: The database utilizes Prolly Trees, a data structure that enables efficient versioning by sharing unchanged data segments across commits rather than duplicating the entire database.
  • MySQL compatibility: The system supports a dolt sql-server mode, allowing standard MySQL clients, BI tools, and application code to connect to the database while retaining the ability to perform version control operations.

Context

Developers typically face a trade-off between using a robust SQL database—which lacks native version control—and storing data in flat files like CSV or JSON, which allows for Git tracking but sacrifices schema enforcement and query performance. Dolt addresses this by implementing a versioned storage engine that sits beneath the SQL interface, providing a workflow for managing data changes that mirrors the standard software development lifecycle.

Content References

{"type": "tool", "title": "Dolt", "url": "https://github.com/dolthub/dolt", "context": "reviewed"}, {"type": "tool", "title": "DoltHub", "url": "https://www.dolthub.com/", "context": "mentioned"}, {"type": "tool", "title": "Git", "context": "mentioned"}, {"type": "tool", "title": "DVC", "context": "mentioned"}, {"type": "tool", "title": "lakeFS", "context": "mentioned"}

  • #dev-tooling
  • #sql
  • #database

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.