Skip to content

Work-in-progress SQL database built from scratch, following the Build Your Own Database tutorial. An educational project to learn database internals — from storage and indexing to SQL parsing and query execution.

Notifications You must be signed in to change notification settings

maziasy/my-sql-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build-Your-Own SQL Database (WIP)

This project is my attempt to build a SQL database from scratch, following the excellent Build Your Own Database tutorial.

My goal is to deepen my understanding of how databases work under the hood, from parsing and query execution to storage and indexing.

⚠️ Note: This project is still in very early development and is not usable yet. Expect incomplete features, breaking changes, and experimental code.


🚧 Current Status

  • Project setup
  • Implement atomic file persistence
  • Understand B-Tree principles
  • Implement B+Tree Node and Serialization Format
  • Implement B+Tree Splits, Balancing & Deletion (in progress)
  • Key-Value Store
  • Free List Management
  • Tables & Schemas
  • Range Queries
  • Secondary Indexes
  • Transactions (Atomicity)
  • Concurrency Control
  • SQL Parser
  • Query Execution

📚 Learning Objectives

  • Understand the low-level data structures.
  • Implement a SQL-like query language.
  • Explore how transactions, concurrency, and durability are handled.
  • Gain deeper intuition for how production databases like SQLite, Postgres, and MySQL are built.

🔧 Installation & Usage

Currently, this project is not ready for general use. If you’d like to follow along, you can explore the source code directly in this repository.


🤝 Contributing

This project is primarily for educational purposes, but feedback, ideas, and discussions are welcome! Feel free to open an issue if you’d like to share thoughts or resources.


📖 Acknowledgments

About

Work-in-progress SQL database built from scratch, following the Build Your Own Database tutorial. An educational project to learn database internals — from storage and indexing to SQL parsing and query execution.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published