North Carolina Voter Database System

Full-Stack Voter Management with Audit Logging & Analytics

PHP · MySQL · PDO · Stored Procedures · Database Triggers

DS-5610 Database Management | Vanderbilt University

Built a comprehensive web-based voter information management system for Mecklenburg County Elections (Charlotte, NC). The platform enables election officials to search voters, track voting history, manage records, and analyze demographics with comprehensive audit logging via database triggers.

System Capabilities

4

Database views

3

Stored procedures

2

Audit tables

6

Application modules

Core Functionality

Voter Search

Look up voter by registration number

Voting History

Track participation across elections

Record Management

Insert, update, delete operations

Audit System

Comprehensive logging via triggers

Analytics Dashboard (4 Views)

  • Constituent Party Statistics: Distribution across political parties
  • Gender Demographics: Breakdown of Democratic voters by gender
  • Age Distribution: Age groups across party affiliations
  • Geographic Analysis: City-wise voter distribution and preferences

Database Design

Stored Procedures

  • get_voting_record - Retrieves complete voting history
  • insert_record - Inserts or updates voting record
  • delete_voter - Cascading removal with audit

Audit Tables

  • audit_insert - Logs all insertions/updates with timestamps
  • audit_delete - Logs deletions with full voter info

Security Features

  • SQL Injection Prevention: PDO prepared statements with parameter binding
  • Input Sanitization: PDO::PARAM_STR for proper string escaping
  • Error Handling: Graceful error messages without exposing system details

Three-Layer Architecture

Presentation

HTML, CSS, PHP Templates

Application

PHP Controllers, PDO

Data

MySQL, Views, Procedures

Technologies Used

PHP 7/8MySQLPDOStored ProceduresDatabase TriggersSQL ViewsHTML5CSS3

Data Source

Mecklenburg County Board of Elections, Charlotte, North Carolina. Publicly available election records.