Skip to content

muhammad-fiaz/RDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RDB - Relational Database with JSON Query Language

GitHub stars GitHub issues GitHub pull requests GitHub last commit GitHub release License Rust Build Docs

High-performance, JSON-based relational database built entirely in Rust.

πŸ“š Documentation | Quick Start

Welcome to RDB - a high-performance, JSON-based relational database built entirely in Rust!

RDB is a modern relational database that combines the power of traditional SQL databases with the simplicity of JSON APIs. Instead of writing SQL strings, you send structured JSON objects to describe your queries.

πŸ“₯ Installation

Download the latest release from GitHub Releases.

Quick Install

Platform Method Command
Linux (x86_64) Direct Download wget https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-linux-x86_64 && chmod +x rdb-linux-x86_64 && sudo mv rdb-linux-x86_64 /usr/local/bin/rdb
macOS (Intel) Direct Download curl -L https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-macos-x86_64 -o rdb && chmod +x rdb && sudo mv rdb /usr/local/bin/
macOS (Apple Silicon) Direct Download curl -L https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-macos-aarch64 -o rdb && chmod +x rdb && sudo mv rdb /usr/local/bin/
Windows (x64) Direct Download Download rdb-windows-x86_64.exe and add to PATH
Any Platform From Source cargo install --git https://github.com/muhammad-fiaz/RDB

Detailed Installation

Linux

# Download
wget https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-linux-x86_64

# Make executable
chmod +x rdb-linux-x86_64

# Move to PATH
sudo mv rdb-linux-x86_64 /usr/local/bin/rdb

# Verify
rdb --version

macOS

# Intel Macs
curl -L https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-macos-x86_64 -o rdb

# Apple Silicon Macs
curl -L https://github.com/muhammad-fiaz/RDB/releases/latest/download/rdb-macos-aarch64 -o rdb

# Make executable and move to PATH
chmod +x rdb
sudo mv rdb /usr/local/bin/

# Verify
rdb --version

Windows

# Download rdb-windows-x86_64.exe from releases

# Move to a directory in your PATH, e.g.:
Move-Item rdb-windows-x86_64.exe C:\Windows\System32\rdb.exe

# Or create a dedicated directory:
New-Item -ItemType Directory -Path "C:\Program Files\RDB"
Move-Item rdb-windows-x86_64.exe "C:\Program Files\RDB\rdb.exe"

# Add to PATH
$env:Path += ";C:\Program Files\RDB"

# Verify
rdb --version

πŸš€ Quick Start

# Initialize RDB
rdb init

# Start server
rdb start

# Create your first table
curl -X POST http://localhost:8080/query \
  -H "Content-Type: application/json" \
  -d '{
    "CreateTable": {
      "database": "main",
      "table": "users",
      "columns": [
        {"name": "id", "type": "int", "primary_key": true},
        {"name": "name", "type": "string"}
      ]
    }
  }'

✨ Features

  • βœ… Complete CRUD operations (CREATE, SELECT, INSERT, UPDATE, DELETE, DROP)
  • βœ… 8 WHERE operators (=, !=, >, <, >=, <=, LIKE, IN)
  • βœ… ORDER BY, LIMIT, OFFSET support
  • βœ… Batch operations
  • βœ… Multi-layer caching (Query cache + Buffer pool + B+ tree)
  • βœ… JWT authentication with role-based access control
  • βœ… Dynamic configuration via config.toml
  • βœ… CLI management tools
  • βœ… Database auto-discovery
  • βœ… Comprehensive documentation

πŸ“Š Performance

  • ⚑ 100,000 queries/second (cached SELECT)
  • πŸ“Š 90-98% cache hit rate
  • πŸš€ 10-50x faster JSON parsing vs SQL
  • πŸ’Ύ O(log N) indexed lookups

πŸ“Š System Requirements

Component Minimum Recommended
RAM 512 MB 2 GB+
Disk 100 MB 1 GB+
CPU 1 core 4+ cores
OS Linux 3.2+, macOS 10.12+, Windows 10+ Latest

πŸ”§ Troubleshooting

Common Issues

"Address already in use"

# Use different port
rdb start --port 9090

"Permission denied"

# On Linux/macOS, ensure executable
chmod +x rdb

# On Windows, run as Administrator

"Cannot connect to server"

# Check if server is running
curl http://localhost:8080/

# Check firewall settings

Get Help

If you encounter any database errors, please report them at: https://github.com/muhammad-fiaz/RDB/issues

πŸ“ Changelog

Visit GitHub Releases for detailed changes.

πŸ“„ License

Licensed under the Apache License 2.0 - see LICENSE for details.

About

RDB is a modern relational database that combines the power of traditional SQL databases with the simplicity of JSON APIs. Instead of writing SQL strings, you send structured JSON objects to describe your queries.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors

Languages