Archit OS
~/projects/dynamic-sql/README.md
← all projects
Backend Tool·Completed

Dynamic SQL Query Automation

A Flask and MySQL CRUD app built around a clean database abstraction layer.

Role
Backend Developer
Timeline
Mar – Apr 2025
Team
Solo
Status
Completed
Dynamic SQL Query Automation screenshot
4
CRUD operations
1
DBHelper class
Auto
incremented IDs

The problem

SQL scattered through route handlers is hard to test, easy to break, and fails badly when the database rejects a write. This project explores running real-time dynamic queries against a live MySQL database while keeping that logic in one place and surfacing failures to the user.

What it does

Complete CRUD

Create, read, update and delete user records through a web interface.

DBHelper abstraction

All SQL lives in one class, so Flask routes only call methods and never build queries themselves.

AUTO_INCREMENT keys

MySQL generates user IDs, guaranteeing uniqueness and integrity.

Graceful constraint errors

Database constraint errors are caught and shown as clear UI feedback.

Logging

Backend operations and errors are written to a log file for traceability.

How it flows

  1. Browser form
  2. Flask route
  3. DBHelper
  4. MySQL
  5. Log + UI feedback

Problems solved

Keeping SQL out of the routes

ProblemQuery logic mixed into controllers is hard to maintain.

SolutionA dedicated DBHelper class owns every query; routes stay thin.

Database errors the user can understand

ProblemA rejected write usually surfaces as a stack trace.

SolutionConstraint errors are handled and turned into readable feedback, with details logged.

Built with

PythonFlaskMySQLSQL