ToyDB: A Rust learning adventure, fun open-source project, and database learning resource for the community

91 points CronSach

Hi everyone, I'm thrilled to share with you my recent adventure into the Rust programming language: ToyDB ReefDB!

​

I created ToyDB ReefDB to improve my Rust skills and have some fun along the way. It's a lightweight, in-memory and on-disk database management system that supports basic SQL query capabilities and full-text search. It's perfect for small-scale projects, learning purposes, and as a resource for people interested in understanding databases.

​

One interesting aspect of ToyDB ReefDB is that the commit history provides valuable insights into the development process and how different database components come together. It helps illustrate the incremental steps taken to build a working database system from scratch. This can be a useful learning tool for those who want to delve into the world of databases.

​

Features:

​

  • In-Memory or On-Disk storage options
  • Basic SQL statements (CREATE TABLE, INSERT, SELECT, UPDATE, DELETE)
  • INNER JOIN support
  • Full-Text Search using an Inverted Index
  • Custom data types (INTEGER, TEXT, FTS\_TEXT)

​

While I learned a lot during the development of ToyDB ReefDB, it's still a work in progress. I've laid out a roadmap for future improvements, which include:

​

  • Support for more SQL statements, indexing and query optimization, transactions, user-defined functions, and much more
  • Improved error handling, full-text search capabilities, authentication mechanisms
  • Distributed database management, command-line interface, better documentation, and performance benchmarks

​

ToyDB ReefDB is licensed under MIT, and I welcome any feedback, forks, improvements, or pull requests from the community.

​

If you like ToyDB ReefDB, please give it a star ⭐ on GitHub: ReefDB

​

Thank you for your attention, and I hope you have as much fun with ToyDB ReefDB as I did building it and learning from its development process!

EDIT: upon feedback I renamed the project to ReefDB because another Rust project was already called ToyDB