0% found this document useful (0 votes)
6 views25 pages

School Page Number

Uploaded by

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

School Page Number

Uploaded by

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

CONTENTS

S.No
ITEMS PAGE
.

1 INTRODUCTION 2

2 WORKING ENVIRONMENT 3

3 FLOW CHART 4

4 SOURCE CODE 5 – 14

5 OUTPUT SCREEN 15 - 31

6 MYSQL TABLES 32

7 CONCLUSION 33

8 BIBLIOGRAPHY 34

1
INTRODUCTION
This project work automates school management system.
School Management System consist of tasks such registering
students, attendance record keeping control to absentees,
details of teacher, fee structure, etc. Data file handling has been
effectively used in the Interrelated data to serve multiple
applications i.e. program. Database is a collection of database
programs create files of information. So, we see that files are
worked with most inside the program itself.

DBMS
The software required for management of data is called DBMS. It
has three models.
Relation model: It stores information In form of rows
(cardinality) and columns (degree).
Hierarchical model. In this type of model, we have multiple
records inside a single record.
Network model: In this, the data is represented by collections of
record and relationships is separated by associations.

Characteristics of DBMS

It reduces the redundancy.


• Data sharing

Data standardization
• Reduction of data inconsistency

Types of files based on access


• Sequential file
• Serial file
• Random file
• Test file

WORKING ENVIRONMENT
2
HARDWARE:
 Processor: Intel® Core™ i3 processor
 Speed: 2.4 GHz
 RAM: 4GB

SOFTWARE:
 Operating system: Windows 10
 Python version: 3.13
 Mysql: for storing database
 Mysql-connector-python: For database
connectivity with program

FLOWCHART
Ben Academy
3
ADMINISTRATION AND STUDENTS AND
LIBRARIAN TEACHERS
 Add Student Details View Students
 Remove Student Details
 Add Teachers Details View fee
 Remove Teacher View book
 Update Salary
 Class And Teachers Attendance
 Update Fee
 Add And Remove Book
 View Entire Data

Source Code:
import mysql.connector as a
print("=======================================
===")
print("WELCOME TO BEN ACADEMY MANAGEMENT")
print("=======================================
===")
#con=a.connect(host='localhost', user='root',
database='schoolmgmt', passwd='Root@123')
#or
####### This automatic way creation #######
host=str(input("ENTER THE DATABASE HOST:"))
user=str(input("ENTER THE DATABASE USER:"))
4
passwrd=str(input("ENTER THE DATABASE PASSWORD:"))
con=a.connect(host=host, user=user, passwd=passwrd)
mycur=con.cursor()
mycur.execute("create database if not exists schoolmgmt")
mycur.execute("use schoolmgmt")
####### End of This automatic way creation #######
####### Creating Schema #######
mycursor=con.cursor()
mycursor.execute("CREATE TABLE IF NOT EXISTS student (name
VARCHAR(30), class VARCHAR(30), roll int, address
VARCHAR(30), phonenumber VARCHAR(30))")
mycursor.execute("CREATE TABLE IF NOT EXISTS teacher (tcode
int PRIMARY KEY, name VARCHAR(30), salary int, address
VARCHAR(30), phonenumber VARCHAR(30))")
mycursor.execute("CREATE TABLE IF NOT EXISTS cattendance
(class VARCHAR(30), clteacher VARCHAR(40), totalst int, date
VARCHAR(30), absentees VARCHAR(30))")
mycursor.execute("CREATE TABLE IF NOT EXISTS tattendace
(name VARCHAR(30), date VARCHAR(30), attendance
VARCHAR(30))")
mycursor.execute("CREATE TABLE IF NOT EXISTS feestructure
(class VARCHAR(30), monthly VARCHAR(30), busfee int, scfee
int, techfee int, total int)")
mycursor.execute("CREATE TABLE IF NOT EXISTS library (bid int
PRIMARY KEY, title VARCHAR(30), author VARCHAR(30),
publisher VARCHAR(30), genre VARCHAR(30))")
####### End of Creating Schema #######

def callactionswithexhandling(action, msg):


try:
return action()
except Exception as e:
print("Failed - " + msg)
print(" Error details :" + str(e))
def student_add():
print("Please enter the student details:")
n=input("Students name: ")
cl=input("Students class: ")
r=int(input("Roll.no: "))
a=input("Students Address: ")
ph=input("Students Phone number: ")
data=(n,cl,r,a,ph)
sql='insert into student values(%s,%s,%s,%s,%s)'
c=con.cursor()
c.execute(sql, data)

5
con.commit()
print("Data entered succesfully")
print("---------")
def student_remove():
print("Please enter the student details to remove:")
cl=input("Students class: ")
r=int(input("Roll.no: "))
data=(cl,r)
sql='delete from student where class=%s and roll=%s'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def student_display():
print("Please enter the details to display the students:")
cl=input("Students class: ")
print("---------")
data=(cl,)
sql='select * from student where class=%s'
c=con.cursor()
c.execute(sql,data)
d=c.fetchall()

for i in d:
print("Name: ",i[0])
print("Class: ",i[1])
print("Roll no.: ",i[2])
print("Address: ",i[3])
print("Phone: ",i[4])
print("")
print("---------")
def teacher_add():
print("Please enter the teacher details:")
tcode=int(input("TCode: "))
n=input("Teachers Name: ")
s=int(input("Salary: "))
a=input("Address: ")
ph=int(input("Phone: "))
data=(tcode,n,s,a,ph)
sql='insert into teacher values(%s,%s,%s,%s,%s)'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data entered succesfully")
print("---------")

6
def teacher_remove():
print("Please enter the teacher details to remove:")
n=input("Teacher Name: ")
tcode=int(input("TCode: "))
data=(n,tcode)
sql='delete from teacher where name=%s and tcode=%s'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def teacher_updatesal():
print("Please enter the details to update teacher's salary:")
n=input("Teacher Name: ")
tcode=int(input("TCode: "))
salary=int(input("Salary: "))
data=(salary, n,tcode)
sql='update teacher set salary=%s where name=%s and
tcode=%s'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def teacher_display():
sql='select * from teacher'
c=con.cursor()
c.execute(sql)
d=c.fetchall()
for i in d:
print("Tcode: ",i[0])
print("Name: ",i[1])
print("Salary: ",i[2])
print("Address: ",i[3])
print("Phone: ",i[4])
print("")
print("---------")
def class_attendance():
d=input("Class: ")
clt=input("Class teacher: ")
t=int(input("Total strength: "))
date=input("Date: ")
ab=int(input("No of absentees: "))
data=(d,clt,t,date,ab)
c=con.cursor()
sql='insert into cattendance values(%s,%s,%s,%s,%s)'
c.execute(sql, data)

7
con.commit()
print("Data entered successfully")
print("---------")
def class_attendancedisplay():
sql='select * from cattendance'
c=con.cursor()
c.execute(sql)
d=c.fetchall()
for i in d:
print("Class: ",i[0])
print("Class teacher: ",i[1])
print("Total St: ",i[2])
print("Date: ",i[3])
print("Absentees: ",i[4])
print("")
print("---------")
def teacher_attendance():
n=input("Name: ")
d=input("Date: ")
a=input("Attendance: ")
data=(n,d,a)
sql='insert into tattendace values(%s,%s,%s)'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data entered successfully")
print("---------")
def teacher_attendancedisplay():
sql='select * from TAttendace'
c=con.cursor()
c.execute(sql)
d=c.fetchall()
for i in d:
print("Name: ",i[0])
print("Date: ",i[1])
print("Attendance: ",i[2])
print("")
print("---------")
def fees_add():
cl=input("Class: ")
m=input("Monthly: ")
b=input("Bus Fees: ")
sc=input("School Fees: ")
tc=input("Tech Fee: ")
t=input("Total: ")
data=(cl,m,b,sc,tc,t)
sql='insert into feestructure values(%s,%s,%s,%s,%s,%s)'

8
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def fees_update():
cl=input("Class: ")
m=input("Monthly: ")
b=input("Bus Fees: ")
sc=input("School Fees: ")
tc=input("Tech Fee: ")
t=input("Total: ")
data=(b,sc,tc,t,cl,m)
sql='update feestructure set busfee=%s, scfee=%s,
techfee=%s, total=%s where class=%s and monthly=%s'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def fees_display():
sql='select * from FeeStructure'
c=con.cursor()
c.execute(sql)
d=c.fetchall()
for i in d:
print("Class: ",i[0])
print("Month: ",i[1])
print("BusFee: ",i[2])
print("ScFee: ",i[3])
print("TechFee: ",i[4])
print("Total: ",i[5])
print("")
print("---------")
def book_add():
bid=int(input("Book id: "))
t=input("Title: ")
a=input("Author: ")
p=input("Publisher: ")
g=input("Genre: ")
data=(bid,t,a,p,g)
sql='insert into library values(%s,%s,%s,%s,%s)'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data entered successfully")
print("---------")

9
def book_remove():
t=input("Title: ")
bid=int(input("Book id: "))
data=(t,bid)
sql='delete from library where title=%s and bid=%s'
c=con.cursor()
c.execute(sql, data)
con.commit()
print("Data updated")
print("---------")
def book_display():
sql='select * from library'
c=con.cursor()
c.execute(sql)
d=c.fetchall()
for i in d:
print("Bid: ",i[0])
print("Title: ",i[1])
print("Author: ",i[2])
print("Publisher: ",i[3])
print("Genre: ",i[4])
print("")
print("---------")
def main():
ch='y'
while ch in ['y' , 'Y']:
print("****************************************")
print("Ben Academy Irrity")
print("****************************************")
print("1.Student")
print("2.Teacher")
print("3.Class Attendance")
print("4.Teacher Attendance")
print("5.Fee Structure")
print("6.Library")
print("----------------------------------------")
option=int(input("Enter the option no: "))
print("")
if option==1:
op='y'
while op in ['y' , 'Y']:
print("-------")
print("Student")
print("-------")
print("1.Add Student")
print("2.Remove Student")
print("3.Display Student details")

10
print("-------")
task=int(input("Enter the task no: "))
if task==1:
callactionswithexhandling(student_add,
"Adding a student, please verify the inputs")
elif task==2:

callactionswithexhandling(student_remove, "Removing a
student, please verify the inputs")
elif task==3:
student_display()
else:
print("Enter the valid option!!!")
op=input("Continue in this 'Student'
option(y/n): ")
elif option==2:
op='y'
while op in ['y' , 'Y']:
print("-------")
print("Teacher")
print("-------")
print("1.Add Teacher")
print("2.Remove Teacher")
print("3.Update Salary")
print("4.Display Teacher details")
print("-------")
task=int(input("Enter the task no: "))
if task==1:
callactionswithexhandling(teacher_add,
"Adding a teacher, please verify the inputs")
elif task==2:

callactionswithexhandling(teacher_remove, "Removing a
teacher, please verify the inputs")
elif task==3:

callactionswithexhandling(teacher_updatesal, "Updating a
teacher salary, please verify the inputs")
elif task==4:
teacher_display()
else:
print("Enter the valid task no!!!")
op=input("Continue in this 'Teacher'
option(y/n): ")
elif option==3:
op='y'
while op in ['y' , 'Y']:
print("-------")
11
print("Class Attendance")
print("-------")
print("1.Add Attendance")
print("2.Display Attendance Details")
print("-------")
task=int(input("Enter the task no: "))
if task==1:

callactionswithexhandling(class_attendance, "Adding a
Class Attendance")
elif task==2:
class_attendancedisplay()
else:
print("Enter the valid task no!!!")
op=input("Continue in this 'Class Attendance'
option(y/n): ")
elif option==4:
op='y'
while op in ['y' , 'Y']:
print("-------")
print("Teacher Attendance")
print("-------")
print("1.Add Attendance")
print("2.Display Attendance Details")
print("-------")
task=int(input("Enter the task no: "))
if task==1:

callactionswithexhandling(teacher_attendance, "Adding a
Teacher Attendance")
elif task==2:
teacher_attendancedisplay()
else:
print("Enter the valid task no!!!")
op=input("Continue in this 'Teacher
Attendance' option(y/n): ")
elif option==5:
op='y'
while op in ['y' , 'Y']:
print("-------")
print("Fee Structure")
print("-------")
print("1.Add Fees")
print("2.Update Fees")
print("3.Display Fees Details")
print("-------")
task=int(input("Enter the task no: "))
if task==1:
12
callactionswithexhandling(fees_add,
"Adding the Fees")
elif task==2:
callactionswithexhandling(fees_update,
"Updating the Fees")
elif task==3:
fees_display()
else:
print("Enter the valid task no!!!")
op=input("Continue in this 'Fee Structure'
option(y/n): ")
elif option==6:
op='y'
while op in ['y' , 'Y']:
print("-------")
print("Library")
print("-------")
print("1.Add Book")
print("2.Remove Book")
print("3.Display Book")
print("-------")
task=int(input("Enter the task no: "))
if task==1:
callactionswithexhandling(book_add,
"Adding a book")
elif task==2:
callactionswithexhandling(book_remove,
"Removing a book")
elif task==3:
book_display()
else:
print("Enter the valid task no!!!")
op=input("Continue in this 'Library'
option(y/n): ")

#Code Entrypoint
main()

13
OUTPUT
SCREEN

14
15
16
17
18
19
20
n

21
MY SQL TABLES

22
CONCLUSION
This Project School management system Is for
computerising the work in a School. It is a great improvement
over the manual system. The computerization of the system will
speed up the process for teachers and the administrators. The
software takes care of the basic requirements of Fee Collection,
Complete attendance automation, effortless grades and marks
management, Publishing of online forums and assignments,

23
Easy management of class information analytical reports and
ordering books from library accordingly.

Limitations:
 More improvement needed in online examinations.
Limited questions have been stored and need more
update and maintenance is required for the
application.

 Storage capacity is too small so that it cannot store


large amount of data. Hence, backup is necessary for
the future improvement.

Future Scope:
 In future our system can include accounting
system, good backup, and restore facility.
 System is so much flexible so in future it can
increase easily and new modules can be added
easily.
 You can add student admission as well as pay
online fees.
 Make online exams more effective, efficient and
more dynamic so that it can help to get good
support from the student.

BIBLIOGRAPHY

 Preeti Arora – Computer science with python

 Sumita Arora – Computer Science with python

 https://www.mycbseguide.com

 https://www.academia.edu

 https://cbsepython.in

24
25

You might also like