Back to Projects
Backend

Mini Algebraic Engine

This project is a Mini Algebraic Engine developed in Java that evaluates relational algebra queries (SELECT, PROJECT, JOIN) on CSV data. The engine executes algebraic plans defined in JSON and supports translating imperative algebra expressions into executable query plans, with focus on functional programming, and automated testing.

January 2026Updated Jan 2026
Mini Algebraic Engine

Overview

The Mini Algebraic Engine (MMA) is an academic project designed to implement a lightweight relational query engine capable of evaluating relational algebra expressions from the command line. The engine supports three core operators—selection, projection, and equi-join—and executes queries on CSV datasets fully loaded in memory.

The project emphasizes key software engineering concepts, including functional programming, collections, and file I/O, while avoiding imperative evaluation strategies. Queries are expressed as execution plans in JSON format or written in a custom algebraic syntax and translated automatically.

My Contribution

I was responsible for the full design and implementation of the engine. This included defining the operator abstraction, implementing relational operators, designing the query execution model, handling JSON parsing and algebra translation, and ensuring compliance with strict build and quality requirements (tests, code coverage, and style rules).

Key Features

Relational Algebra Execution

The engine evaluates algebraic execution plans composed of SCAN, SELECT, PROJECT, and JOIN operators, producing results as CSV files.

Functional Evaluation Model

Each operator is implemented as a functional component that returns a new table without mutating its inputs, enabling clean composition and predictable execution.

Dual Query Input Support

  • JSON-based execution plans representing operator trees
  • Custom algebraic syntax (.alg) translated automatically into JSON plans

Robust Engineering Practices

  • Built with Maven and Java 17
  • Unit tests implemented with JUnit 5
  • Code coverage measured using JaCoCo
  • Coding standards enforced via Checkstyle

Outcome

  • A fully functional relational query engine executable as a standalone JAR
  • Clean functional architecture for operator composition
  • Automated testing and quality enforcement integrated into the build
  • A solid foundation for extending the engine with additional operators and optimizations

Skills and Tools

JavaJUnitMavenJacocoGSonOOPFunctional Programming

Project Links