Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🏫 School Management Database

This repository contains SQL scripts for a School Management System built in PostgreSQL.
It demonstrates table creation, relationships, views, procedures, and reporting queries.
A schema diagram is included for visual clarity.


📐 Database Schema Diagram

School Management Database Schema


📂 Contents

  • students — student records with admission details, phone, email, fee status
  • teachers — teacher records with performance, age, rank, salary
  • class_incharge — classes with assigned teachers
  • student_class — enrollment mapping between students and classes
  • teacher_subject — subjects assigned to teachers
  • matric_marks — student marks with topper view
  • student_fee — fee records linked to marks

📊 Features

  • Automatic salary updates based on teacher rank and performance
  • Procedures for easy student data entry (NEW_STUDENT)
  • Rollup queries for teacher salary and performance reports
  • Bonus calculations for excellent teachers (INCHARGE_BONUS view)
  • Topper reports combining marks and fees (TOPPERS view)
  • Comprehensive teacher reports (average, total, and count by rank/performance)

🚀 Usage

  1. Clone this repository.
  2. Run the SQL file (school_management.sql) in pgAdmin or psql.
  3. Explore tables, views, and reports using the provided queries.

📌 Example Reports

  • Class Incharge Data: Teacher details with student counts per class
  • Bonus Report: Salary + bonus calculations for teachers
  • Topper Report: Student ranking by marks with fee details
  • Teacher Reports: Salary averages, totals, and counts grouped by rank and performance

📬 Contact

For questions or collaboration, reach out via GitHub.

About

“PostgreSQL schema and queries for a school management system with students, teachers, classes, subjects, marks, and fees.”

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages