{"repo":"Bohun9/toy-db","free":true,"listed":false,"github":"https://github.com/Bohun9/toy-db","clone":"git clone https://github.com/Bohun9/toy-db.git","description":"Educational relational DBMS","language":"OCaml","stars":12,"topics":["database","dbms","ocaml","sql"],"license":null,"category":"databases-storage","readme_excerpt":"ToyDB ToyDB is an educational relational database management system implemented in OCaml. Features - SQL support - B+ tree index with latch crabbing protocol - Concurrent transactions using strong strict 2-phase locking with deadlock detection - Metadata about tables is stored as internal tables; DDL queries are internally executed as DML queries Architecture Overview ToyDB follows a traditional relational database architecture: SQL ↓ Logical Plan ↓ Physical Plan ↓ Execution Engine ↓ Storage Layer (Heap Files / B+ Tree Indexes) ↓ Buffer Pool → Lock Manager ↓ Disk - SQL queries are parsed and analyzed into a logical plan. - Logical plans are translated into physical plans. - Physical plans are executed using an iterator-style execution engine. - Data is stored in heap files and B+ tree indexes. - The buffer pool manages in-memory pages and disk I/O using FORCE and NO-STEAL policies. - The lock manager uses strong strict two-phase locking at page granularity. SQL Support Data Types - INT (8 bytes) - STRING (max 32 bytes) Data Definition - CREATE TABLE table (...) - DROP TABLE table Data Modification - INSERT INTO table VALUES (...) - DELETE FROM table WHERE ... - COMMIT and ABORT Data Query - SELECT ... FROM ... - WHERE (predicates of the form field op constant ) - JOIN - GROUP BY - LIMIT and OFFSET - subqueries Running the Shell Demo Missing Features - Server architecture - Multi-version concurrency control - Crash recovery and logging system - Query optimization","default_branch":null,"files":null,"tree":[],"storefront":"/r/Bohun9","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Bohun9/toy-db/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}