Skip to content
Brian-1812Public

About

Simple OLTP Database built with Typescript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

ShoxDB

A simple OLTP relational database system implemented in TypeScript.

Features

  • Storage Engine: Fixed-size pages (4KB), Heap File organization, Buffer Pool Manager.
  • Indexing: B+Tree index implementation.
  • Transactions: ACID properties with 2PL (Two-Phase Locking) and WAL (Write-Ahead Logging).
  • SQL Engine: Basic SQL parser and executor supporting CREATE, INSERT, SELECT, UPDATE, DELETE.
  • Recovery: Crash recovery using WAL replay.

Architecture

  • Server: Entry point, handles REPL.
  • SQL Layer: Parser and Executor.
  • Transaction Layer: TransactionManager and LockManager.
  • Access Methods: Table (Heap) and BPlusTree.
  • Buffer Manager: BufferPool managing Pages.
  • Disk Manager: Handles file I/O.
  • WAL: LogManager and LogRecovery.

Getting Started

Prerequisites

  • Node.js
  • npm

Installation

npm install

Running the Server

npm start

Running Tests

npm test

SQL Syntax

CREATE TABLE users (id int, name string)
INSERT INTO users VALUES (1, 'Alice')
SELECT * FROM users WHERE id = 1

About

Simple OLTP Database built with Typescript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages