awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com

Build Your Own Database Engine

Ranking updated Jun 30, 2026

For a project for understanding databases by building one, the first results are cmu-db/bustub, oceanbase/miniob (MiniOB is an educational relational database kernel with B+ Tree and LSM-Tree storage, SQL parsing, MVCC transactions, and disk persistence—exactly the hands-on, code-based resource for learning database internals from scratch) and cstack/db_tutorial (cstack/dbtutorial is a classic C-based educational SQLite clone that demonstrates B-tree storage, SQL parsing, and disk persistence from scratch, making it a perfect fit for learning database internals even though it doesn't cover LSM-trees, transactions, or concurrency control). skyzh/mini-lsm and jankotek/mapdb round out the shortlist. Compare the match explanations and check the project documentation against your requirements.

Educational projects and resources for implementing storage engines, query parsers, and database internals from scratch.

Build Your Own Database Engine

Find the best repos with AI.We'll search the best matching repositories with AI.
  • cmu-db/bustubcmu-db avatar

    cmu-db/bustub

    4,861View on GitHub↗

    This is an educational relational database engine used in Carnegie Mellon University's database systems course. Students learn internals by implementing core components of a working database, including storage, indexing, concurrency control, and crash recovery. The system covers key database architecture: a B+ tree index for fast key-based lookups and range scans, a disk-oriented buffer pool that caches pages from disk, an iterator-based query execution model that composes physical operators, page-based storage for records, two-phase locking for coordinating concurrent transactions, and write

    Bustub is the educational database engine from CMU's database course, providing a full codebase where you implement core internals like B+ trees, buffer pools, two-phase locking, SQL execution, and crash recovery—exactly the hands-on learning resource for understanding storage and database internals, and it covers most of the required features including B-tree, transactions, concurrency control, and SQL parsing.

    C++B+ Tree Indexing
    View on GitHub↗4,861
  • oceanbase/minioboceanbase avatar

    oceanbase/miniob

    4,318View on GitHub↗

    MiniOB is an open-source educational relational database kernel designed for learning the internals of database systems. It implements a dual-engine storage architecture combining B+ Tree and LSM-Tree, supports SQL parsing and query execution, and provides transactional processing with multi-version concurrency control. The system communicates with clients using the MySQL wire protocol and includes a vector database extension for storing and querying high-dimensional vectors. The project distinguishes itself through its comprehensive coverage of core database concepts in a single, learnable c

    MiniOB is an educational relational database kernel with B+ Tree and LSM-Tree storage, SQL parsing, MVCC transactions, and disk persistence—exactly the hands-on, code-based resource for learning database internals from scratch.

    C++LSM-Tree Key-Value StoresB+ Tree Indexing
    View on GitHub↗4,318
  • cstack/db_tutorialcstack avatar

    cstack/db_tutorial

    10,464View on GitHub↗

    This project is an educational implementation of a relational database engine written in C. It functions as a SQLite clone, demonstrating the internal mechanics of a database system through a C-based systems project that focuses on manual memory management and file I/O. The engine is distinguished by its use of a bytecode virtual machine, which executes database operations by compiling SQL statements into low-level instructions. It utilizes a B-tree database engine to organize records in a balanced tree structure, ensuring efficient insertion, search, and range scanning. The system covers co

    cstack/db_tutorial is a classic C-based educational SQLite clone that demonstrates B-tree storage, SQL parsing, and disk persistence from scratch, making it a perfect fit for learning database internals even though it doesn't cover LSM-trees, transactions, or concurrency control.

    CB-Tree
    View on GitHub↗10,464
  • skyzh/mini-lsmskyzh avatar

    skyzh/mini-lsm

    4,034View on GitHub↗

    Mini-LSM is an educational storage engine and key-value database library designed to demonstrate the implementation of log-structured merge-tree architecture. It serves as a pedagogical resource for understanding how to build high-performance storage systems from the ground up, focusing on the mechanics of persistent data structures and disk-based storage. The project provides a functional framework for managing data through memory-to-disk flushing and multi-version concurrency control. It distinguishes itself by implementing snapshot-based isolation, which allows for consistent views of the

    This Rust-based course walks you through building an LSM-tree storage engine from scratch, making it a perfect hands-on tutorial for understanding key storage internals; note it focuses only on LSM-trees and does not cover B-trees, SQL parsing, or transactions.

    RustLog-Structured Merge-TreesLSM-Tree Storage Engines
    View on GitHub↗4,034
  • jankotek/mapdbjankotek avatar

    jankotek/MapDB

    5,046View on GitHub↗

    MapDB is an embedded database engine and disk-backed collection library that stores Java collections on disk or off-heap. It functions as a local data processing engine designed to handle datasets that exceed available physical RAM. The project utilizes off-heap data storage to eliminate garbage collection overhead and employs disk overflow caching to balance memory and disk usage. It provides specialized utilities for filtering and analyzing large volumes of local data on a single machine. The system ensures data integrity through ACID-compliant transactions and multi-version concurrency co

    MapDB is a fully-featured embedded database engine, not a step-by-step tutorial or codebase designed to teach storage internals, so it shows the result rather than the learning process this search is after.

    JavaACID Transactional CoresACID-CompliantB-Tree
    View on GitHub↗5,046
  • slatedb/slatedbslatedb avatar

    slatedb/slatedb

    2,730View on GitHub↗

    SlateDB is a cloud-native key-value store and distributed database engine that utilizes a log-structured merge-tree architecture. It serves as a transactional storage layer designed to persist data directly to cloud object storage. The engine differentiates itself by optimizing read performance for remote storage through the use of bloom filters and multi-level block caching. It employs a single-writer multi-reader model and provides the ability to create zero-copy clones via copy-on-write checkpointing. The system supports atomic transactions, range queries, and snapshot-based concurrency c

    SlateDB is a production-grade LSM-tree key-value store and storage engine, but it is a fully built database engine rather than a tutorial or code-based guide that walks through building a simple database from scratch for learning purposes.

    RustLog-Structured Merge-TreesLSM-Tree Key-Value Stores
    View on GitHub↗2,730
  • mbdavid/litedbmbdavid avatar

    mbdavid/LiteDB

    9,410View on GitHub↗

    LiteDB is a serverless, embedded NoSQL document database for .NET applications. It persists data into a single portable file, functioning as a BSON data store that resides within the application process rather than running as a separate server. The system is ACID compliant, utilizing write-ahead logging to ensure atomic, consistent, isolated, and durable transactions. It includes built-in encryption to provide secure local data storage and protect files on disk from unauthorized access. The project covers object-document mapping to convert classes into document formats, indexed search capabi

    LiteDB is a complete embedded NoSQL document database for production use, not a tutorial or step-by-step demonstration of building a database from scratch—while its source code could be studied, the repository itself doesn't guide learning storage internals as requested.

    C#ACID Transactional CoresB-TreeDatabase Transactions
    View on GitHub↗9,410
  • cberner/redbcberner avatar

    cberner/redb

    4,248View on GitHub↗

    redb is an embedded key-value store and ACID-compliant storage engine. It functions as a persistent storage system for saving and retrieving data as key-value pairs within a tree structure. The engine is built as an MVCC transactional database, utilizing multi-version concurrency control to manage simultaneous reads and writes without blocking. It employs a single-writer multi-reader model to ensure data consistency while allowing multiple threads to access the store. The system provides persistent state management and atomic transaction management to prevent data corruption during crashes.

    This repository is a production-grade embedded key-value store and ACID engine, not a tutorial — it implements B-trees, MVCC, and write-ahead logging but does not walk you through building them from scratch, so it lacks the educational focus you need.

    RustACID Transactional CoresACID-Compliant
    View on GitHub↗4,248
  • spacejam/sledspacejam avatar

    spacejam/sled

    8,928View on GitHub↗

    Sled is an embedded key-value store and ACID-compliant database designed for high-performance data persistence. It functions as a log-structured storage engine that organizes data using B+ trees to support efficient range queries and prefix scans. The engine implements a zero-copy data store model, utilizing epoch-based reclamation to provide direct references to cached values without memory allocations. It distinguishes itself through a combination of write-ahead logging, page cache optimizations to reduce write amplification on flash storage, and serializable transactions for atomic multi-k

    Sled is a production-quality embedded key-value store and ACID database, not a tutorial or code-based demonstration project — it is the real thing to learn from by reading its code, not a step-by-step build-along resource for understanding storage internals.

    RustACID Transactional CoresB-TreeLog-Structured Merge-Trees
    View on GitHub↗8,928
  • cockroachdb/pebblecockroachdb avatar

    cockroachdb/pebble

    5,777View on GitHub↗

    Pebble is an embedded key-value storage engine written in Go, designed as a library that provides durable, write-optimized data persistence directly within applications. It organizes data using a log-structured merge-tree (LSM-tree) structure, where writes are first buffered in an in-memory skiplist memtable and persisted to a write-ahead log before being flushed to block-based SSTable files on disk. The engine supports atomic batch commits, configurable write synchronization, and automatic background compaction that merges and rewrites sorted runs to reclaim space and maintain read performanc

    Pebble is a production-grade embedded key-value storage engine with LSM-tree internals, not a tutorial or code example that walks you through building a simple database from scratch for learning purposes.

    GoLog-Structured Merge-TreesLSM-Tree Key-Value Stores
    View on GitHub↗5,777
  • boltdb/boltboltdb avatar

    boltdb/bolt

    14,642View on GitHub↗

    Bolt is a single-file embedded key-value store for Go applications. It is an ACID transactional database that organizes data in B+trees on disk to provide efficient sorted key retrieval and range scans. The system uses a memory-mapped model to map the database file directly into the process address space for fast random-access reads. The project distinguishes itself through a multi-version concurrency control architecture that allows multiple simultaneous readers to access a consistent snapshot of data without blocking a writer. It employs a single-writer multi-reader locking model and uses a

    BoltDB is a full-featured embedded key-value store with B+trees, ACID transactions, and MVCC—covering many internals you want to learn—but it is a production library, not a tutorial or codebase that teaches you how to build one from scratch.

    GoACID Transactional CoresB-Tree
    View on GitHub↗14,642
  • etcd-io/bboltetcd-io avatar

    etcd-io/bbolt

    9,573View on GitHub↗

    bbolt is an ACID-compliant embedded key-value store for Go applications. It persists all data in a single memory-mapped file on disk, organizing information using B+ trees to facilitate sorted key iteration and efficient range queries. The project distinguishes itself through a hierarchical data organization model, allowing buckets to be nested within other buckets to create a tree-like structure. It employs a single-writer, multi-reader locking mechanism and copy-on-write transactions to ensure serializable isolation and data integrity. The system includes comprehensive data management capa

    bbolt is a production-grade embedded key-value store, not a tutorial or learning resource that demonstrates how to build such a database from scratch, so it only indirectly aids understanding storage internals through code study rather than being an educational guide.

    GoACID Transactional CoresB-Tree
    View on GitHub↗9,573
Compare the top 10 at a glance
RepositoryStarsLanguageLicenseLast push
cmu-db/bustub4.9KC++mitFeb 16, 2026
oceanbase/miniob4.3KC++mulanpsl-2.0Dec 24, 2025
cstack/db_tutorial
10.5K
C
MIT
Mar 4, 2024
skyzh/mini-lsm4KRustApache-2.0Apr 22, 2026
jankotek/mapdb5KJavaApache-2.0May 14, 2026
slatedb/slatedb2.7KRustapache-2.0Feb 20, 2026
mbdavid/litedb9.4KC#MITJun 8, 2026
cberner/redb4.2KRustapache-2.0Feb 14, 2026
spacejam/sled8.9KRustapache-2.0Nov 4, 2025
cockroachdb/pebble5.8KGobsd-3-clauseFeb 21, 2026

Related searches

  • a curriculum on how databases work inside
  • a project for learning in-memory stores by building one
  • a project for learning Git by reimplementing it
  • a project for learning OS internals by building one
  • a hands-on project for learning systems programming
  • an embedded key-value store for local persistence
  • a project-based way to learn compilers
  • a local database for offline-first mobile apps