Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ubik69/backEndDevelopment/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Primary School Management System uses a MySQL database with eight core tables that manage students, parents, teachers, classes, gym memberships, salaries, contact forms, and administrative access.All tables use auto-incrementing primary keys for their ID fields unless otherwise specified.
Tables
Student1
Stores student information and links students to their parents and classes.Auto-incrementing primary key for student identification
Student’s first name
Student’s last name
Student’s date of birth
Foreign key reference to the Parent table
Foreign key reference to the Class table
Relationships
- Parent: Many-to-one relationship via
Parent_ID - Class: Many-to-one relationship via
Class_ID - Gym: One-to-one relationship (students can have gym memberships)
Example Query
Parent
Stores parent and guardian contact information.Auto-incrementing primary key for parent identification
Parent’s first name
Parent’s last name
Parent’s residential address
Parent’s email address for communication
Relationships
- Student1: One-to-many relationship (one parent can have multiple children)
Example Query
Teacher
Stores teacher information including contact details and compensation.Auto-incrementing primary key for teacher identification
Bonus compensation amount for the teacher
Teacher’s subject specialization or field of expertise
Teacher’s first name
Teacher’s last name
Teacher’s residential address
Teacher’s mobile phone number
Teacher’s email address
Relationships
- Class: One-to-many relationship (one teacher can manage multiple classes)
- Salary: One-to-many relationship (teachers can have multiple salary records)
Example Query
Class
Stores class information including year group and assigned teacher.Auto-incrementing primary key for class identification
Year group or class name (e.g., ‘Year 1’, ‘Year 2’)
Maximum number of students allowed in the class
Foreign key reference to the Teacher table
Relationships
- Teacher: Many-to-one relationship via
Teacher_ID - Student1: One-to-many relationship (one class contains multiple students)
Example Query
Gym
Stores gym membership information for students with various membership tiers.Auto-incrementing primary key for gym membership identification
Foreign key reference to the Student1 table
Full name of the gym member
Registration date for the gym membership
Membership tier: ‘bronzeMember’, ‘silverMember’, ‘goldMember’, or ‘diamondMember’
Any medical conditions or health notes for the member
Relationships
- Student1: Many-to-one relationship via
Sid
Membership Duration
Bronze
30 days membership duration
Silver
60 days membership duration
Gold
90 days membership duration
Diamond
180 days membership duration
Example Query
Salary
Stores salary records for teachers including payment amounts and working hours.Auto-incrementing primary key for salary record identification
Foreign key reference to the Teacher table
Base salary amount for the teacher
Working hours or schedule information
Relationships
- Teacher: Many-to-one relationship via
Teacher_ID
Example Query
Contact
Stores contact form submissions and feedback from users.Auto-incrementing primary key for contact record identification
Name of the person submitting the contact form
Email address or phone number for follow-up communication
Message content from the contact form
Example Query
admin_login
Stores administrative user credentials for system access.Administrator username for login
Administrator password for authentication
Example Query
Database Relationships Diagram
Common Queries
Get All Students with Parent and Class Information
Get Teacher with Their Classes and Salary
Get Students with Active Gym Memberships
Best Practices
Use Prepared Statements
Always use prepared statements or parameterized queries to prevent SQL injection attacks
Validate Foreign Keys
Ensure Parent_ID, Class_ID, and Teacher_ID exist before inserting student or class records
Data Validation
Validate email formats, date ranges, and required fields at the application level
Index Performance
Consider adding indexes on foreign key columns for better query performance