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
cstack avatar

cstack/db_tutorial

0
View on GitHub↗
10,464 stars·1,029 forks·C·MIT·21 viewscstack.github.io/db_tutorial↗

Db Tutorial

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 core database internals, including SQL compilation workflows, disk-based persistence, and B-tree indexing with recursive node traversal and node splitting. It also implements data cursor management for navigating result sets.

Features

  • Relational Database Engines - Implements a complete relational database engine from scratch, including storage, indexing, and query execution.
  • Disk-Persistent Data Structures - Implements disk-persistent data structures that map the B-Tree directly to a binary file for durability.
  • Educational Database Systems - Designed as an educational project to demonstrate the internal mechanics of relational databases and storage engines.
  • SQL-to-Bytecode Compilation - Translates SQL text into a custom bytecode format for execution by a virtual machine.
  • SQLite Clones - Implements a relational database engine in C that clones the SQLite architecture from scratch.
  • B-Tree - Implements a B-Tree storage system that maps data directly to a binary file for durable disk-based storage.
  • C Systems Programming - Written in C with a focus on manual memory management and direct file I/O for database internals.
  • Manual Memory Management - Employs explicit memory allocation and deallocation in C to precisely control on-disk data layout.
  • Source-to-Bytecode Compilers - Translates structured SQL text into low-level executable bytecode for the virtual machine.
  • Bytecode Virtual Machines - Provides a custom bytecode virtual machine to execute compiled SQL instructions.
  • Database Implementations - Provides a step-by-step implementation of a database to demonstrate SQL compilation and disk persistence.
  • Cursor-Based Iteration - Implements cursors for traversing and iterating through records within the storage engine.
  • Single-File Persistence - Encapsulates the entire database system and its data within a single portable binary file.
  • SQL Statement Parsing - Translates SQL text into an internal bytecode representation through a parsing phase.
  • Node Splitting - Maintains B-Tree balance by dividing full nodes and updating parent pointers during data insertion.
  • Recursive Search Traversals - Provides recursive tree traversal logic to navigate from the root node down to the leaf nodes for record lookup.
  • Systems Implementation Projects - A low-level implementation focusing on manual memory management and file I/O to build database internals.
  • B-Tree Traversals - Implements recursive traversal from root to leaf nodes to locate specific keys or ranges.

Star history

Star history chart for cstack/db_tutorialStar history chart for cstack/db_tutorial

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does cstack/db_tutorial do?

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.

What are the main features of cstack/db_tutorial?

The main features of cstack/db_tutorial are: Relational Database Engines, Disk-Persistent Data Structures, Educational Database Systems, SQL-to-Bytecode Compilation, SQLite Clones, B-Tree, C Systems Programming, Manual Memory Management.

What are some open-source alternatives to cstack/db_tutorial?

Open-source alternatives to cstack/db_tutorial include: pingcap/talent-plan — Talent Plan provides guided training programs and curricula centered on distributed database design, systems… jankotek/mapdb — MapDB is an embedded database engine and disk-backed collection library that stores Java collections on disk or… oceanbase/miniob — MiniOB is an open-source educational relational database kernel designed for learning the internals of database… mbdavid/litedb — LiteDB is a serverless, embedded NoSQL document database for .NET applications. It persists data into a single… google/btree — This is an in-memory B-Tree data structure implementation for Go. It provides a memory-resident collection that… litedb-org/litedb — LiteDB is a serverless NoSQL document store and embedded database engine for .NET applications. It persists…

Open-source alternatives to Db Tutorial

Similar open-source projects, ranked by how many features they share with Db Tutorial.
  • pingcap/talent-planpingcap avatar

    pingcap/talent-plan

    10,938View on GitHub↗

    Talent Plan provides guided training programs and curricula centered on distributed database design, systems programming, and open source contribution workflows. The project offers a distributed systems education program consisting of curated courses and labs focused on database internals. The curriculum emphasizes the use of the Rust language for building high-performance networked applications and implementing distributed algorithms. It integrates educational materials on version control, community governance, and the specific processes required to contribute to public software projects. T

    Rust
    View on GitHub↗10,938
  • 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

    Java
    View on GitHub↗5,046
  • 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

    C++classroomcplusplusdatabase
    View on GitHub↗4,318
  • 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

    C#
    View on GitHub↗9,410
See all 30 alternatives to Db Tutorial→