Add complete financial fraud detection database with Docker, schema, data generation, and SQL exercises

- Docker setup with PostgreSQL 16 and DB-UI web interface
- Comprehensive 20+ table schema with fraud detection patterns
- Idempotent shell scripts for data generation (no Python dependency)
- Realistic geographic data (100 US cities, 210 world cities)
- 5M+ transactions with embedded fraud patterns (velocity, geographic, structuring, etc.)
- Progressive SQL exercises from beginner to advanced fraud detection
- Complete documentation and quick start guide
- Setup and verification scripts
This commit is contained in:
Alphaeus Mote
2025-10-23 13:53:30 -04:00
parent 9d9104a4fe
commit b30733ccad
15 changed files with 3864 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
-- ============================================================================
-- Database Initialization Script
-- ============================================================================
-- This script ensures the database is created and ready
-- It runs automatically when the PostgreSQL container starts
-- ============================================================================
-- Ensure the database exists (this runs in the default postgres database)
SELECT 'Database initialization starting...' AS status;
-- Set timezone
SET timezone = 'UTC';
-- Show current database
SELECT current_database() AS current_db, current_user AS current_user, version() AS pg_version;
-- Enable required extensions
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
SELECT 'Extensions enabled successfully' AS status;