School Management System
A COMPUTER SCIENCE PROJECT REPORT
SUBMITTED BY
ROSHAN R
XII A
MAHALAKSHMI VIDYA MANDIR
CHENNAI – 600044
CERTIFICATE
This is to certify ROSHAN R of Class XII A has successfully completed the
Computer Science project titled SCHOOL MANAGEMENNT SYSTEM
during the academic session 2025–26 as prescribed by the Central Board of
Secondary Education (CBSE) in partial fulfillment of the requirement for Class
XII Computer Science curriculum. It is further certified that this project is the
original work of the student and has been carried out under my supervision.
Examiner Teacher Incharge Principal
(Signature & Date) (Signature & Date) (Signature & Date)
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to our Correspondent for providing us
with the opportunity, facilities, and encouragement to successfully complete this
project. Their continuous support has been a source of inspiration throughout
this work.
I take this opportunity to extend my heartfelt thanks to our respected Principal,
Mrs. Suman J, whose guidance, motivation, and valuable advice have always
encouraged us to aim higher and complete this project with dedication.
I am deeply grateful to my Computer Science teacher, Mrs. Sangeetha T, for her
constant guidance, support, and valuable suggestions during the preparation of
this project. Her insightful feedback and encouragement have been instrumental
in shaping my work.
Finally, I wish to thank my beloved parents for their constant encouragement and
moral support, and my friends for their cooperation and help throughout the
completion of this project.
TABLE OF CONTENTS
[Link] CONTENTS [Link]
1 ABSTRACT
2 OVERVIEW OF PYTHON AND MYSQL
3 HARDWARE& SOFTWARE REQUIREMENTS
4 FUNCTIONS
5 MODULES
6 SOURCE CODE
7 OUTPUT
8 CONCLUSION
9
LIMITATIONS AND FUTURE SCOPE
10 REFERENCE
1
ABSTRACT
This project implements a school management system using Python's Tkinter library for
the graphical user interface and SQLite for database management. The application
provides a robust platform for administrators to manage student records, including adding
new students, removing existing students, updating student marks, and viewing all
student details. Students can also access their specific information using their admission
number. The system ensures secure access through an admin login interface. Key
functionalities include:
1. Admin Login Page: Secures administrative functions with a password-protected
login.
2. Student Management: Allows administrators to add, remove, and update student
records.
3. Marks Management: Enables updating of student test scores.
4. Data Display: Provides a detailed view of all student records in a tabulated format.
5. Student Access Page: Permits students to retrieve their information using their
admission number.
The database schema includes fields for personal information, contact details, and test
scores. The script ensures ease of navigation and user-friendly interaction, making it a
practical tool for school administration. The program structure encapsulates database
operations, user authentication, and GUI design within distinct functions, ensuring
modularity and maintainability.
2
OVERVIEW OF PYTHON AND MYSQL
PYTHON:
Python is a high level, interpreted, interactive and object-oriented scripting language.
Python is designed to be highly readable. It uses English keywords frequently where as
other languages use punctuation, and it has fewer syntactical constructions than other
languages.
♦ Python is Interpreted : Python is processed at runtime by the interpreter. You do not
need to compile your program before executing it.
♦ Python is Interactive : You can actually sit at a python prompt and interact with the
interpreter directly to write your programs.
♦ Python is Object-Oriented : Python supports Object Oriented style or technique of
programming that encapsulates code within objects.
♦ Python is a Beginner’s Language : Python is a great language for the beginner-level
programmers and supports the development of a wide range of applications from simple
text processing to WWW browser to games.
♦ Python features include :
⮚ Easy to learn : Python has few keywords, simple structure, and a clearly defined
syntax. This allows the student to pick up the language quickly.
⮚ Easy to read : Python code is more clearly defined and visible to the eyes.
⮚ Easy to maintain : Python’s source code is fairly easy to maintain.
⮚ A board standard library : Python’s bulk of the library is very portable and cross-
platform compatible on UNIX, Windows, and Macintosh.
⮚ Interactive Mode : Python has support for an interactive mode which allows interactive
testing and debugging of snippets of code.
⮚ Portable : Python can run on a wide variety of hardware platforms and has the same
interface on all platforms.
⮚ Extendable : You can add low-level modules to the python interpreter. These modules
enable programmers to add to or customize their tools to be more efficient.
⮚ Databases : Python provides interfaces to all major commercial databases.
3
⮚ GUI programming : Python supports GUI applications that can be created and ported
to many system calls, libraries and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.
⮚ Boolean
⮚ Integer
⮚ Long
⮚ Float
⮚ String
⮚ List
⮚ Object
⮚ None
ADVANTAGES:
♦ Python is a high-level programming language that has English-like syntax.
♦ Easy to read, Learn and Write.
♦ Improved Productivity
♦ Interpreted language
♦ Dynamically Typed
♦ Free and Open-Source
4
MYSQL
MYSQL:
SQL (Structured Query Language) is a powerful programming language used for managing
and manipulating relational databases. It provides a standard set of commands for
creating, querying, modifying, and managing the data stored in a database.
Key Components of SQL:
o Database Management System (DBMS): SQL operates in conjunction with a DBMS,
which is software designed to manage databases and provide access to their data.
Popular DBMSs include MySQL, Oracle, Microsoft SQL Server, and PostgreSQL.
o Data Definition Language (DDL): DDL statements define and manage the structure of
database objects. Commands such as CREATE, ALTER, and DROP are used to create,
modify, and delete tables, indexes, views, and other database objects.
o Data Manipulation Language (DML): DML statements manipulate the data within the
database. The SELECT statement is the primary DML command used to retrieve data
from one or more tables. Other DML commands include INSERT, UPDATE, and
DELETE, which are used to insert new data, update existing data, and delete data,
respectively.
o Data Control Language (DCL): DCL statements control access to the database.
Commands like GRANT and REVOKE are used to grant or revoke privileges and
permissions for database users, ensuring secure access and operations.
o Data Query Language (DQL): DQL, a subset of SQL, focuses specifically on querying
and retrieving data from the database. It includes commands like SELECT, FROM,
WHERE, GROUP BY, HAVING, and ORDER BY, which specify the data to be retrieved,
filter it based on conditions, and perform sorting and grouping operations.
o Data Integrity and Constraints: SQL allows the specification of constraints to ensure
data integrity. Constraints such as primary keys, foreign keys, unique keys, and check
constraints enforce rules and relationships within the database, maintaining the
accuracy and consistency of the data.
5
HARDWARE AND SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS:
→ A Personal computer with ;
▪ RAM 1MB or above
▪ Hard disk space of 128MB
SOFTWARE REQUIREMENTS:
→ Operating System :
▪ Windows : Windows 10 or higher with 64 bit architecture.
▪ Mac OS : Mac OS X or higher with 64 bit architecture.
→ Software :
▪ Python 3, version 3.9.1 or above.
INSTALLATION OF PYTHON :
1) Visit [Link].
2) Click on the downloads tab and download the latest version of python setup file. After
downloading, execute the file and install Python application.
6
FUNCTIONS
• create_connection(): Establishes a connection to the SQLite database.
• create_tables(): Creates the students table if it does not already exist.
• recreate_tables(): Drops the existing students table and recreates it.
• add_student(name, admn_no, class_, dob, father_number, father, mother, address,
mother_number, test_1, test_2, test_3, test_4): Adds a new student record to the database.
• remove_student(student_id): Removes a student record from the database based on the student
ID.
• update_marks(student_id, test_1, test_2, test_3, test_4): Updates the test scores for a given
student.
• get_all_students(): Retrieves all student records from the database.
• get_student_by_admn_no(admn_no): Retrieves a student record based on the admission
number.
• get_next_admn_no(): Retrieves the next available admission number.
• main_page(): Sets up the main page with options for Admin Login and Student Page.
• admin_page(): Sets up the admin login page.
• admin_access(): Sets up the admin access page with options to add, remove, update marks, and
view all students.
• add_student_window(): Creates a window for adding a new student.
• remove_student_window(): Creates a window for removing a student.
• update_marks_window(): Creates a window for updating student marks.
• view_students_window(): Creates a window to view all student records.
• student_page(): Sets up the student page where students can retrieve their information using their
admission number.
• check_password(): Validates the admin password and grants access to admin functions.
• submit() (within add_student_window(), remove_student_window(), update_marks_window(),
student_page()): Submits data from the forms to the corresponding database functions and provides
feedback to the user.
7
MODULES
Sqlite3
SQLite3 can be integrated with Python using the sqlite3 module, which was written
by Gerhard Haring. It provides an SQL interface compliant with the DB-API 2.0
specification described by PEP 249. This module allows for easy database
management and manipulation directly within Python scripts. You do not need to
install this module separately because it is shipped by default along with Python
version 2.5.x onwards.
Tkinter
Tkinter is an open-source, portable graphical user interface (GUI) library designed
for use in Python scripts. Tkinter relies on the Tk library, the GUI library used by
Tcl/Tk and Perl, which is in turn implemented in C. Therefore, Tkinter can be said to
be implemented using multiple layers. It provides a wide range of tools to create and
manage GUI applications, making it a popular choice for Python developers.
8
SOURCE CODE:
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox
from tkcalendar import DateEntry
import sqlite3
[
def create_connection():
connection = [Link]('[Link]')
return connection
def create_tables():
connection = create_connection()
cursor = [Link]()
[Link]('''
CREATE TABLE IF NOT EXISTS students (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT DEFAULT NULL,
admn_no INTEGER NOT NULL UNIQUE,
class TEXT DEFAULT NULL,
dob TEXT DEFAULT NULL,
father_number TEXT DEFAULT NULL,
father TEXT DEFAULT NULL,
mother TEXT DEFAULT NULL,
address TEXT DEFAULT NULL,
mother_number TEXT DEFAULT NULL,
test_1 INTEGER NOT NULL,
test_2 INTEGER NOT NULL,
test_3 INTEGER NOT NULL,
test_4 INTEGER NOT NULL
)
''')
[Link]()
9
[Link]()
10
def recreate_tables():
connection = create_connection()
cursor = [Link]()
[Link]('DROP TABLE IF EXISTS students')
create_tables()
[Link]()
def add_student(name, admn_no, class_, dob, father_number, father, mother, address, mother_number, test_1,
test_2, test_3, test_4):
connection = create_connection()
cursor = [Link]()
[Link]('''
INSERT INTO students (name, admn_no, class, dob, father_number, father, mother, address,
mother_number, test_1, test_2, test_3, test_4)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
''', (name, admn_no, class_, dob, father_number, father, mother, address, mother_number, test_1, test_2,
test_3, test_4))
[Link]()
[Link]()
def remove_student(student_id):
connection = create_connection()
cursor = [Link]()
[Link]('DELETE FROM students WHERE id=?', (student_id,))
[Link]()
[Link]()
def update_marks(student_id, test_1, test_2, test_3, test_4):
connection = create_connection()
cursor = [Link]()
[Link]('''
UPDATE students
SET test_1 = ?, test_2 = ?, test_3 = ?, test_4 = ?
WHERE id = ?
''', (test_1, test_2, test_3, test_4, student_id))
[Link]()
11
[Link]()
12
def get_all_students():
connection = create_connection()
cursor = [Link]()
[Link]('SELECT * FROM students')
students = [Link]()
[Link]()
return students
def get_student_by_admn_no(admn_no):
connection = create_connection()
cursor = [Link]()
[Link]('SELECT * FROM students WHERE admn_no=?', (admn_no,))
student = [Link]()
[Link]()
return student
def admin_page():
login_window = [Link]()
login_window.title("Admin Login")
login_window.geometry("300x150")
login_window.configure(bg="#f0f8ff")
def check_password():
if password_entry.get() == "SSM@123":
login_window.destroy()
admin_access()
else:
[Link]("Error", "Incorrect password")
[Link](login_window, text="Enter Admin Password:",
bg="#f0f8ff", font=("Arial", 14)).pack(pady=10)
password_entry = [Link](login_window, show="*", font=("Arial", 14))
password_entry.pack(pady=5)
[Link](login_window, text="Login", command=check_password,
13
bg="#87cefa", font=("Arial", 14), width=20).pack(pady=10)
14
login_window.mainloop()
def get_next_admn_no():
connection = create_connection()
cursor = [Link]()
[Link]('SELECT MAX(admn_no) FROM students')
max_admn_no = [Link]()[0]
[Link]()
return (max_admn_no + 1) if max_admn_no is not None else 1
def admin_access():
admin_window = [Link]()
admin_window.title("Admin Page")
admin_window.geometry("800x600")
admin_window.configure(bg="#f0f8ff")
def add_student_window():
window = [Link](admin_window)
[Link]("Add Student")
[Link]("800x600")
[Link](bg="#f0f8ff")
form_frame = [Link](window, bg="#f0f8ff")
form_frame.pack(expand=True)
next_admn_no = get_next_admn_no()
fields = [
("Name", [Link](form_frame, font=("Arial", 14))),
("Admission No", [Link](form_frame, text=str(
next_admn_no), font=("Arial", 14), bg="#f0f8ff")),
("Class", [Link](form_frame, font=("Arial", 14), values=[
"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII"])),
("DOB", DateEntry(form_frame, font=("Arial", 14), date_pattern="dd-mm-yyyy")),
("Father Number", [Link](form_frame, font=("Arial", 14))),
15
("Father Name", [Link](form_frame, font=("Arial", 14))),
16
("Mother Name", [Link](form_frame, font=("Arial", 14))),
("Address", [Link](form_frame, font=("Arial", 14))),
("Mother Number", [Link](form_frame, font=("Arial", 14))),
("Test 1", [Link](form_frame, font=("Arial", 14))),
("Test 2", [Link](form_frame, font=("Arial", 14))),
("Test 3", [Link](form_frame, font=("Arial", 14))),
("Test 4", [Link](form_frame, font=("Arial", 14)))
]
for idx, (label_text, entry_widget) in enumerate(fields):
[Link](form_frame, text=label_text + ":", bg="#f0f8ff", font=("Arial",
14)).grid(row=idx, column=0, padx=10, pady=10, sticky="e")
entry_widget.grid(row=idx, column=1, padx=10, pady=10)
fields[idx] = entry_widget
def submit():
entries = [[Link]()
for entry in fields if isinstance(entry, [Link])]
[Link](1, next_admn_no)
if all(entries):
add_student(*entries)
[Link]("Success", "Student added successfully!")
[Link]()
else:
[Link]("Error", "Please fill all fields")
submit_button = [Link](
window, text="Submit", command=submit, bg="#87cefa", font=("Arial", 14), width=20)
submit_button.pack(pady=10)
[
def remove_student_window():
window = [Link](admin_window)
[Link]("Remove Student")
[Link]("400x200")
17
[Link](bg="#f0f8ff")
18
[Link](window, text="Admission ID:", bg="#f0f8ff",
font=("Arial", 14)).pack(pady=10)
student_id_entry = [Link](window, font=("Arial", 14))
student_id_entry.pack(pady=5)
def submit():
student_id = student_id_entry.get()
connection = create_connection()
cursor = [Link]()
[Link](
'SELECT admn_no FROM students WHERE admn_no=?', (student_id,))
check_student_id = [Link]()
if check_student_id:
remove_student(student_id)
[Link]("Success", "Student removed successfully!")
[Link]()
else:
[Link](
"Error", "Please enter a valid Student ID")
submit_button = [Link](
window, text="Submit", command=submit, bg="#87cefa", font=("Arial", 14), width=20)
submit_button.pack(pady=10)
def update_marks_window():
window = [Link](admin_window)
[Link]("Update Marks")
[Link]("400x300")
[Link](bg="#f0f8ff")
[Link](window, text="Admission ID:", bg="#f0f8ff",
19
font=("Arial", 14)).pack(pady=10)
student_id_entry = [Link](window, font=("Arial", 14))
20
student_id_entry.pack(pady=5)
[Link](window, text="Test 1:", bg="#f0f8ff",
font=("Arial", 14)).pack(pady=10)
test_1_entry = [Link](window, font=("Arial", 14))
test_1_entry.pack(pady=5)
[Link](window, text="Test 2:", bg="#f0f8ff",
font=("Arial", 14)).pack(pady=10)
test_2_entry = [Link](window, font=("Arial", 14))
test_2_entry.pack(pady=5)
[Link](window, text="Test 3:", bg="#f0f8ff",
font=("Arial", 14)).pack(pady=10)
test_3_entry = [Link](window, font=("Arial", 14))
test_3_entry.pack(pady=5)
[Link](window, text="Test 4:", bg="#f0f8ff",
font=("Arial", 14)).pack(pady=10)
test_4_entry = [Link](window, font=("Arial", 14))
test_4_entry.pack(pady=5)
def submit():
student_id = student_id_entry.get()
test_1 = test_1_entry.get()
test_2 = test_2_entry.get()
test_3 = test_3_entry.get()
test_4 = test_4_entry.get()
if all([student_id, test_1, test_2, test_3, test_4]):
update_marks(student_id, test_1, test_2, test_3, test_4)
[Link]("Success", "Marks updated successfully!")
[Link]()
21
else:
[Link]("Error", "Please fill all fields")
submit_button = [Link](
window, text="Submit", command=submit, bg="#87cefa", font=("Arial", 14), width=20)
submit_button.pack(pady=10)
def view_students_window():
window = [Link](admin_window)
[Link]("View All Students")
[Link]("1000x600")
[Link](bg="#f0f8ff")
tree = [Link](window, columns=(
"ID", "Name", "Admission No", "Class", "DOB", "Father Number", "Father Name", "Mother Name",
"Address", "Mother Number", "Test 1", "Test 2", "Test 3", "Test 4"), show='headings')
[Link]("ID", text="ID")
[Link]("Name", text="Name")
[Link]("Admission No", text="Admission No")
[Link]("Class", text="Class")
[Link]("DOB", text="DOB")
[Link]("Father Number", text="Father Number")
[Link]("Father Name", text="Father Name")
[Link]("Mother Name", text="Mother Name")
[Link]("Address", text="Address")
[Link]("Mother Number", text="Mother Number")
[Link]("Test 1", text="Test 1")
[Link]("Test 2", text="Test 2")
[Link]("Test 3", text="Test 3")
[Link]("Test 4", text="Test 4")
[Link](expand=True, fill="both")
students = get_all_students()
22
for student in students:
[Link]("", "end", values=student)
[Link](admin_window, text="Add Student", command=add_student_window, bg="#87cefa",
font=("Arial", 14), width=20).pack(pady=10)
[Link](admin_window, text="Remove Student", command=remove_student_window, bg="#87cefa",
font=("Arial", 14), width=20).pack(pady=10)
[Link](admin_window, text="Update Marks", command=update_marks_window, bg="#87cefa",
font=("Arial", 14), width=20).pack(pady=10)
[Link](admin_window, text="View All Students", command=view_students_window, bg="#87cefa",
font=("Arial", 14), width=20).pack(pady=10)
admin_window.mainloop()
def student_page():
def submit():
admn_no = admn_no_entry.get()
student = get_student_by_admn_no(admn_no)
if student:
info_window = [Link](student_window)
info_window.title("Student Information")
info_window.geometry("400x400")
info_window.configure(bg="#f0f8ff")
info_labels = [
f"ID: {student[0]}",
f"Name: {student[1]}",
f"Admission No: {student[2]}",
f"Class: {student[3]}",
f"DOB: {student[4]}",
f"Father Number: {student[5]}",
f"Father Name: {student[6]}",
f"Mother Name: {student[7]}",
f"Address: {student[8]}",
23
f"Mother Number: {student[9]}",
24
f"Test 1: {student[10]}",
f"Test 2: {student[11]}",
f"Test 3: {student[12]}",
f"Test 4: {student[13]}"
]
for info in info_labels:
[Link](info_window, text=info, bg="#f0f8ff",
font=("Arial", 14)).pack(pady=5)
else:
[Link]("Error", "Student not found")
student_window = [Link]()
student_window.title("Student Page")
student_window.geometry("400x200")
student_window.configure(bg="#f0f8ff")
[Link](student_window, text="Enter Admission Number:",
bg="#f0f8ff", font=("Arial", 14)).pack(pady=10)
admn_no_entry = [Link](student_window, font=("Arial", 14))
admn_no_entry.pack(pady=5)
submit_button = [Link](student_window, text="Submit",
command=submit, bg="#87cefa", font=("Arial", 14), width=20)
submit_button.pack(pady=10)
student_window.mainloop()
def main_page():
main_window = [Link]()
main_window.title("Main Page")
main_window.geometry("400x300")
main_window.configure(bg="#f0f8ff")
25
[Link](main_window, text="Admin Login", command=admin_page,
bg="#87cefa", font=("Arial", 14), width=20).pack(pady=20)
[Link](main_window, text="Student Page", command=student_page,
bg="#87cefa", font=("Arial", 14), width=20).pack(pady=20)
main_window.mainloop()
#recreate_tables()
create_tables()
main_page()
26
OUTPUT
OUTPUT:
Admin Page:
27
OUTPUT:
28
OUTPUT
OUTPUT:
Student Page:
29
Conclusion
This program allows us to perform basic school operations such as Add Student, Edit
Students marks and view students’ marks.
Interactive Features
• Chatbots/Assistants: Implement AI-driven chatbots for student queries and
administrative support.
• Notifications & Alerts: Real-time updates via push notifications, emails, or SMS
for important events and deadlines.
Functional Improvements
1. Comprehensive Modules:
o Attendance Management: Integrate biometric or RFID-based attendance
tracking.
o Gradebook Integration: Automate grading and integrate with learning
management systems (LMS).
o Course Management: Offer tools for curriculum management, including
course creation, scheduling, and tracking progress.
2. Automation and Workflow Enhancements:
• Automate Repetitive Tasks: Use RPA (Robotic Process Automation) for repetitive
tasks like form filling, scheduling, and report generation.
• Workflow Integration: Seamlessly integrate workflows for admissions, exams,
and alumni tracking.
30
REFERENCE
WEBSITES:
⮚ [Link]
⮚ [Link] [Link]
⮚ [Link]
python/#google_vignette
BOOKS:
TITLE OF THE BOOK:
COMPUTER SCIENCE TEXTBOOK FOR CLASS XI
31