Skip to content

Database Engine Prototype is a lightweight Java engine with page-based storage, CSV metadata, and custom Octree indexing for fast multi-dimensional queries—ideal for learning database internals and prototyping analytics back-ends.

Notifications You must be signed in to change notification settings

AliMohameddddd/Octree-IndexDB-Optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Database Engine Prototype

MIT License

A lightweight, high-performance Java-based database engine showcasing core relational operations and advanced multi-dimensional indexing. Perfect for data-science infrastructure and systems-engineering portfolios!


🎯 Overview

  • Language: Java
  • Storage: Serialized disk pages + CSV metadata
  • Indexing: Custom Octree (3-dimensional)
  • Use Cases: Learning database internals, building analytics backends, prototyping query engines

✨ Key Capabilities

Feature Description
🔧 Relational Data Management Define flexible schemas (Integer, String, Double, Date) & perform full CRUD workflows.
📊 Octree Indexing 3D spatial indexing for ultra-fast range and point searches over multi-attribute data.
💾 Optimized Storage
  • Serialized Pages: Persistent, thread-safe storage
  • Lazy Loading: Pages load on demand to minimize memory footprint | | ⚙️ Concurrency-Ready I/O | Vector-backed reads/writes ensure safe multi-threaded access. |

🛠️ Technical Highlights

  1. Java Core & Serialization

    • Clean package structure under com.yourorg.dbapp
    • Java’s built-in serialization for persistence
  2. Metadata-Driven Design

    • Table schemas, constraints, and index configs in a simple CSV file
    • Easy to extend or migrate to alternative metadata stores
  3. Custom Octree Implementation

    • Supports up to three indexed columns
    • Efficient insertion, deletion, and range-query algorithms
  4. Performance Strategies

    • Lazy Page Loading: Minimize RAM usage
    • Vector I/O Buffers: Atomic, thread-safe disk operations

⚙️ Installation & Setup

  1. Clone
    git clone https://github.com/yourusername/database-application-project.git
    cd database-application-project

Compile

bash Copy Edit javac -cp ".:libs/" src/main/java/com/yourorg/dbapp/.java Run

bash Copy Edit java -cp ".:libs/*:src/main/java" com.yourorg.dbapp.DBApp 📖 Usage Guide Initialize Database

Launch the console interface

Create tables by specifying column names & types

Data Operations

INSERT: Add new rows

SELECT: Query with optional Octree-backed filters

UPDATE/DELETE: Modify or remove data

Index Management

Create Octree indices on up to three columns

Monitor query performance improvements

Tuning

Adjust page size in configuration for different workloads

Compare performance with/without indices

🤝 Contributing I welcome enhancements, especially:

Alternative index structures (R-trees, LSM-trees)

Transaction support & concurrency controls

Integrations with SQL parsers or query planners

Fork the repo

Create a feature branch

Submit a pull request

📄 License This project is released under the MIT License. See LICENSE.md for details.

About

Database Engine Prototype is a lightweight Java engine with page-based storage, CSV metadata, and custom Octree indexing for fast multi-dimensional queries—ideal for learning database internals and prototyping analytics back-ends.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages