0% found this document useful (0 votes)
15 views23 pages

SV - COMPUTER SCIENCE PROJECT Final

Uploaded by

mkavipriya156
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views23 pages

SV - COMPUTER SCIENCE PROJECT Final

Uploaded by

mkavipriya156
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

PROJECT ON SCHOOL MANAGEMENT

SYSTEM
PROJECT REPORT

COMPUTER SCIENCE FOR CLASS XII


(2024-2025)
Submitted in partial fulfillment of the requirement of CBSE, Delhi

BY T.SASIVARNAN
Enrollment No:

UNDER THE GUIDANCE OF

Mrs. C.KALAIMANI
M.Sc(cs),Mphil,B.Ed

(P.G.T COMPUTER SCIENCE)

AKSHAYA ACADEMY CBSE SENIOR

SECONDARY SCHOOL, ODDANCHATRAM.

i
AKSHAYA ACADEMY CBSE SENIOR SECONDARY
SCHOOL ODDANCHATRAM

COMPUTER SCIENCE
2024-2025

BONAFIDE CERTIFICATE

This is to certify that this project entitles “SCHOOL


MANAGEMENT SYSTEM” is a record bonafide work carried out
by T.SASIVARNAN in COMPUTER SCIENCE prescribed by
AKSHAYA ACADEMY CBSE SENIOR SECONDARY
SCHOOL,ODDANCHATRAM.

ROLL NUMBER: DATE:

INTERNAL EXAMINER EXTERNAL EXAMINER

PRINCIPAL

ii
ACKNOWLEDGEMENT

First I thank the Almighty for providing me everything


that I required in completing this project. I express my
Gratitude to my Principal Mrs.R.Sowmya,
My Coordinator Mr.A.Balaji and My Computer Science

teacher Mrs.C.Kalaimani who guided me through the

project and also gave valuable suggestion and guidance for

completing the project, also helped me to understand the

intricate involved in making the project. I would like to

extend my sincere thanks to all of them . I also thank my

parents and my friends who helped to complete the project

successfully.

iii
TABLE OF CONTENTS

S.NO CONTENTS PAGE NO.


01 INTRODUCTION 1

02 SYSTEM REQUIREMENTS 2

03 FLOW CHART 3

04 OBJECTIVES OF THE PROJECT 5

05 SOURCE CODE 6

06 OUTPUT SCREENSHOTS 14

07 CONCLUSION 18

08 BIBILIOGRAPHY
19

iv
01.INTRODUCTION

This is my project on School Management System in python. This project is

all about software for School Management. It helps the School to have a full-

fledged control over his/her stall. It adds a new student; update details of

existing student data ,view all current student data. Besides it adds Fee or a

student, exam results for a student, It can also manage staffs working in a

school.

This is a simple console-based application and developed including python

script and a database (MYSQL database). Talking about the program ,it is

very easy to understand and use.

It includes all of the fundamental features required in a school management

system. The person can use all those available capabilities without difficulty

and without any restrictions.

1
02. SYSTEM REQUIREMENTS

2.1. SOFTWARE REQUIREMENTS:

Operating System: Windows 10 & above or any Linux platform

Editor: Visual Studio Code or any other editor like Python


IDLE,
i5 5th generation, Sublime Text that supports python.

Core software: Python 3.12 or 3.13 or the latest available


version at the time of installation.

2.2. HARDWARE REQUIREMENTS:

Processor: PENTIUM –IV GHz or any INTEL Processor


minimum (i5,5th or 6th processor) and above.

RAM: Minimum requirement (8 GB,128 GB SSD)

HARD DISK: Minimum of 20 GB of space any make of your


choice.

2
03.FLOWCHART

3
4
04.OBJECTIVES OF THE PROJECT

The objective of this project is to let the students apply the

programming knowledge into a real- world situation/problem and

exposed the students how programming skills helps in developing a

good software.

1. Write programs utilizing modern software tools.

2. Apply object oriented programming principles effectively when

developing small to medium sized projects.

3. Write effective procedural code to solve small to medium sized

problems.

4. Students will demonstrate a breadth of knowledge in computer

science, as exemplified in the areas of systems, theory and

software development.

5. Students will demonstrate ability to conduct a research or applied

Computer Science project, requiring writing and presentation skills

which exemplify scholarly style in computer science.

5
05.SOURCE CODE

import mysql.connector
import os
from time import sleep

# Connect to MySQL and create School_db database


try:
db = mysql.connector.connect(host="localhost", user="root",
passwd="root")
cursor = db.cursor()
cursor.execute("CREATE DATABASE IF NOT EXISTS School_db")
cursor.execute("USE School_db")
except mysql.connector.Error as err:
print("Database not accessible:", err)
exit()

# Table creation queries


tables = {
"student": "CREATE TABLE IF NOT EXISTS student (sname
VARCHAR(30), admno INT PRIMARY KEY, dob DATE, cls CHAR(4), cty
CHAR(25))",
"emp": "CREATE TABLE IF NOT EXISTS emp (ename CHAR(25),
empno INT PRIMARY KEY, job CHAR(20), hiredate DATE)",
"fee": "CREATE TABLE IF NOT EXISTS fee (admno INT, fee DOUBLE,
month CHAR(15))",
"exam": "CREATE TABLE IF NOT EXISTS exam (sname CHAR(25),
admno INT, per DOUBLE, res CHAR(10))"
}

for table, query in tables.items():


cursor.execute(query)

# Functions
def insert1():
sname = input("Enter Student Name: ")
admno = int(input("Enter Admission No: "))
dob = input("Enter Date of Birth (yyyy-mm-dd): ")
cls = input("Enter class for admission: ")
cty = input("Enter City: ")
sql = "INSERT INTO student (sname, admno, dob, cls, cty) VALUES (%s,
%s, %s, %s, %s)"

6
try:
cursor.execute(sql, (sname, admno, dob, cls, cty))
db.commit()
print('\nData saved successfully\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def display1():
try:
cursor.execute("SELECT * FROM student")
results = cursor.fetchall()
for c in results:
print(f"(sname={c[0]}, admno={c[1]}, dob={c[2]}, cls={c[3]},
cty={c[4]})")
except mysql.connector.Error as err:
print("Error:", err)
input("Press Enter to continue")

def update1():
admno = int(input("Enter Admission No: "))
new_class = input("Enter new class: ")
sql = "UPDATE student SET cls = %s WHERE admno = %s"
try:
cursor.execute(sql, (new_class, admno))
db.commit()
print('\nData updated successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def delete1():
admno = int(input("Enter Admission No to delete: "))
sql = "DELETE FROM student WHERE admno = %s"
try:
ans = input("Are you sure you want to delete the record (y/n): ")
if ans.lower() == 'y':
cursor.execute(sql, (admno,))
db.commit()
print('\nRecord deleted successfully..\n')
except mysql.connector.Error as err:

7
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def insert2():
ename = input("Enter Employee Name: ")
empno = int(input("Enter Employee No: "))
job = input("Enter Designation: ")
hiredate = input("Enter Date of Joining (YYYY-MM-DD): ")
sql = "INSERT INTO emp (ename, empno, job, hiredate) VALUES (%s,
%s, %s, %s)"
try:
cursor.execute(sql, (ename, empno, job, hiredate))
db.commit()
print('\nData saved successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def display2():
try:
cursor.execute("SELECT * FROM emp")
results = cursor.fetchall()
for c in results:
print(f"(empno={c[1]}, ename={c[0]}, job={c[2]}, hiredate={c[3]})")
except mysql.connector.Error as err:
print("Error:", err)
input("Press Enter to continue")

def update2():
empno = int(input("Enter Employee No: "))
new_job = input("Enter new designation: ")
sql = "UPDATE emp SET job = %s WHERE empno = %s"
try:
cursor.execute(sql, (new_job, empno))
db.commit()
print('\nData updated successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

8
def delete2():
empno = int(input("Enter Employee No to delete: "))
sql = "DELETE FROM emp WHERE empno = %s"
try:
ans = input("Are you sure you want to delete the record (y/n): ")

if ans.lower() == 'y':
cursor.execute(sql, (empno,))
db.commit()
print('\nRecord deleted successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def insert3():
admno = int(input("Enter Admission No: "))
fee = float(input("Enter Fee Amount: "))
month = input("Enter Month: ")
sql = "INSERT INTO fee (admno, fee, month) VALUES (%s, %s, %s)"
try:
cursor.execute(sql, (admno, fee, month))
db.commit()
print('\nData saved successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def display3():
try:
cursor.execute("SELECT * FROM fee")
results = cursor.fetchall()
for c in results:
print(f"(admno={c[0]}, fee={c[1]}, month={c[2]})")
except mysql.connector.Error as err:
print("Error:", err)
input("Press Enter to continue")

def update3():
admno = int(input("Enter Admission No: "))
new_fee = float(input("Enter new fee amount: "))

9
new_month = input("Enter new month: ")
sql = "UPDATE fee SET fee = %s, month = %s WHERE admno = %s"
try:
cursor.execute(sql, (new_fee, new_month, admno))
db.commit()
print('\nData updated successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()

input("Press Enter to continue")

def delete3():
admno = int(input("Enter Admission No to delete: "))
sql = "DELETE FROM fee WHERE admno = %s"
try:
ans = input("Are you sure you want to delete the record (y/n): ")
if ans.lower() == 'y':
cursor.execute(sql, (admno,))
db.commit()
print('\nRecord deleted successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def insert4():
sname = input("Enter Student Name: ")
admno = int(input("Enter Admission No: "))
per = float(input("Enter Percentage: "))
res = input("Enter Result: ")
sql = "INSERT INTO exam (sname, admno, per, res) VALUES (%s, %s,
%s, %s)"
try:
cursor.execute(sql, (sname, admno, per, res))
db.commit()
print('\nData saved successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

10
def display4():
try:
cursor.execute("SELECT * FROM exam")

results = cursor.fetchall()
for c in results:
print(f"(sname={c[0]}, admno={c[1]}, per={c[2]}, res={c[3]})")
except mysql.connector.Error as err:
print("Error:", err)
input("Press Enter to continue")

def update4():
admno = int(input("Enter Admission No: "))
new_per = float(input("Enter new percentage: "))

new_res = input("Enter new result: ")


sql = "UPDATE exam SET per = %s, res = %s WHERE admno = %s"
try:
cursor.execute(sql, (new_per, new_res, admno))
db.commit()
print('\nData updated successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

def delete4():
admno = int(input("Enter Admission No to delete: "))
sql = "DELETE FROM exam WHERE admno = %s"
try:
ans = input("Are you sure you want to delete the record (y/n): ")
if ans.lower() == 'y':
cursor.execute(sql, (admno,))
db.commit()
print('\nRecord deleted successfully..\n')
except mysql.connector.Error as err:
print("Error:", err)
db.rollback()
input("Press Enter to continue")

# Main selection function

11
def selection(choice):
if choice == 1:
print("\nSTUDENT MANAGEMENT SYSTEM")
print("a. New Admission\nb. Update Student Details\nc. Issue TC\nd.
Display Student Records")
c = input("Enter choice (a-d): ").lower()
if c == 'a': insert1()
elif c == 'b': update1()
elif c == 'c': delete1()
elif c == 'd': display1()
else: print("Invalid choice.")
elif choice == 2:
print("\nEMPLOYEE MANAGEMENT SYSTEM")
print("a. Add New Employee\nb. Update Employee Details\nc. Remove
Employee\nd. Display Employee Records")
c = input("Enter choice (a-d): ").lower()
if c == 'a': insert2()
elif c == 'b': update2()
elif c == 'c': delete2()

elif c == 'd': display2()


else: print("Invalid choice.")
elif choice == 3:
print("\nFEE MANAGEMENT SYSTEM")
print("a. New Fee Submission\nb. Update Fee\nc. Delete Fee\nd. Display
Fee Records")
c = input("Enter choice (a-d): ").lower()
if c == 'a': insert3()
elif c == 'b': update3()
elif c == 'c': delete3()
elif c == 'd': display3()
else: print("Invalid choice.")
elif choice == 4:
print("\nEXAM MANAGEMENT SYSTEM")
print("a. Insert Exam Data\nb. Update Exam Data\nc. Delete Exam
Data\nd. Display Exam Data")
c = input("Enter choice (a-d): ").lower()
if c == 'a': insert4()
elif c == 'b': update4()
elif c == 'c': delete4()
elif c == 'd': display4()
else: print("Invalid choice.")

12
# Main loop for the program
while True:
print('-----------------------------------\nWELCOME TO SCHOOL
MANAGEMENT SYSTEM\n-----------------------------------')
print("1. STUDENT MANAGEMENT")
print("2. EMPLOYEE MANAGEMENT")
print("3. FEE MANAGEMENT")
print("4. EXAM MANAGEMENT")
print("5. EXIT")

try:
choice = int(input("Enter your choice (1-5): "))
if choice == 5:
print("Exiting program....")
exit()
break
elif 1 <= choice <= 4:
selection(choice)
else:
print("Invalid choice! Try again.")
except ValueError:
print("Please enter a valid number.")

# Close the database connection at the end of the program


db.close()

13
06.OUTPUT SCREENSHOTS

6.1 Adding new student data

6.2 Updating student data

14
6.3 Deleting a student data

6.4 Viewing all students data

15
6.5 Adding new staff details

6.6 Updating staff details

16
6.7 Deleting a staff record

6.8 Display all staff details

17
07.CONCLUSION

The SCHOOL MANAGEMENT SYSTEM is written in python


programming language. Python is very smooth to research the syntax
emphasizes readability and it is able to reduce time ingesting in developing. I
have successfully designed a program in python with SQL for SCHOOL
MANAGEMENT SYSTEM. As now everything in the world is turning to
online ,this would be an initiative step for a normal school to run by an
artificial intelligence using this program.

I grant you all the permission to this program and later on, it can be modified.

18
08.BIBILIOGRAPHY

❖ COMPUTER SCIENCE WITH PYTHON


BY:SUMITA ARORA

❖ https://wikipedia.com/

❖ https://python.mykvs.in/

THANK YOU

19

You might also like