Database Schema

Complete database structure documentation for developers and DBAs

Database Overview

MaxChurches uses MySQL 8.0+ with utf8mb4 character set for full Unicode support. The database is designed with proper normalization and relationships to ensure data integrity and performance.

Database Engine
MySQL 8.0+
Character Set
utf8mb4
Storage Engine
InnoDB
Tables
120+
Database Design: The database follows Laravel conventions with proper foreign key relationships, indexes for performance, and soft deletes for data integrity.

Core Tables

The main database tables that power MaxChurches functionality.

Table Name Purpose Relationships
churches Church organization data One-to-many with users, members
users System user accounts Belongs to church
members Church member profiles Belongs to church, has many attendance
services Church service scheduling Belongs to church, has many attendance
attendance Attendance tracking Belongs to member and service
church_transactions Financial transactions Belongs to member and money_type
church_events Church events and activities Belongs to church, has many registrations

Database Relationships

Understanding the relationships between tables is crucial for effective querying and data integrity.

Primary Relationships
  • Churches → Users: One church has many users
  • Churches → Members: One church has many members
  • Members → Attendance: One member has many attendance records
  • Services → Attendance: One service has many attendance records
Foreign Key Constraints
  • CASCADE on church deletion
  • SET NULL on user deletion
  • RESTRICT on referenced records
  • Automatic cleanup of orphaned data
Download Database Schema

Download this database schema documentation as a PDF for offline reference.

Database Support

Need help with database optimization or custom queries? Our DBA team can assist you.