All projects
Database EngineeringAcademic / Team projectAcademic / team project

Student Examination Management System

A PostgreSQL examination system with JSONB, Arabic ICU collation and database-level logic.

Grading and generation implemented in stored procedures

Database-native logic

ICU collation and JSONB for Arabic examination content

Arabic-first

Reset, backup and restore scripting in Bash

Operational

Overview

A PostgreSQL-based examination management system designed around exams, questions, answers, grading and reporting, with core application logic implemented at the database level.

Problem

Examination systems usually bury their logic in an application layer. This project inverts that: the database is the product. Storing and querying exams, questions and answers — with Arabic content, structured question data and procedural grading — demands serious schema and stored-procedure design.

Solution

A database-centric design where PostgreSQL schema, stored procedures and roles implement the business: JSONB for flexible question data, Arabic ICU collation for correct text ordering, and procedures for exam generation, answer submission, correction and reporting. Bash scripts wrap reset, backup and restore operations.

My Contribution / Role

An academic / team project. The repository is owned by a teammate (ZahwaKandeel). This case study documents the PostgreSQL engineering work Mostafa contributed to — schema, constraints, stored procedures and exam workflows.

Architecture

How data moves through the system.

Business logic lives in the database: schema, then procedures, then reports.

  1. 01Database Schema
  2. 02Stored Procedures
  3. 03Reports
Technology stack
PostgreSQLSQLPL/pgSQLBashJSONBICU CollationStored ProceduresDatabase Roles
Key features
  • 01CRUD operations
  • 02Exam generation
  • 03Answer submission
  • 04Exam correction
  • 05Grading and reports
  • 06JSONB question storage
  • 07Arabic ICU collation
  • 08Database roles and security
  • 09Backup / restore scripting
Engineering outcomes

Grading and generation implemented in stored procedures

Database-native logic

ICU collation and JSONB for Arabic examination content

Arabic-first

Reset, backup and restore scripting in Bash

Operational

Data Layer

PostgreSQL schema with JSONB for flexible, structured question data and Arabic ICU collation for correct Arabic ordering and search.

Operations

Stored procedures implement exam generation, answer submission and automated correction.

Reporting

Grading and reporting logic lives in the database, close to the data it reads.

Security

Database roles scope access to the operations each user performs.

Tooling

Bash scripts cover reset, backup and restore workflows.

Testing

Reset operations, integration, performance and report verification, run against a local PostgreSQL instance.

Challenges
  • Representing varied question formats in one schema — JSONB keeps it flexible without losing queryability.
  • Correct Arabic text ordering and comparison via ICU collations.
  • Keeping grading correct and atomic inside stored procedures.
Engineering decisions
  • The database can be the product — logic close to data is fast and consistent.
  • A defined backup and reset cycle makes database projects safe to develop against.