School Management System
School Management System
PROJECT REPORT ON
SCHOOL MANAGEMENT
SYSTEM
ROLL NO : _________________
CLASS : XII
1
PROJECT GUIDE : Ms. Simmi Gupta
TABLE OF CONTENTS
1 CERTIFICATE 3
2 ACKNOWLEDGEMENT 4
6 OUTPUT 15-25
7 BIBLIOGRAPHY 26
2
CERTIFICATE
SYSTEM in the subject Computer Science (083) laid down in the regulations of
Examiner:
Name: _________________
Signature:
3
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of
this project.
I express deep sense of gratitude to almighty God for giving me strength for the
successful completion of the project.
The guidance and support received from all the members who contributed and who
are contributing to this project, was vital for the success of the project. I am grateful
for their constant support and help.
Roll No _________________________________
4
PROJECT ON SCHOOL MANAGEMENT SYSTEM
SYNOPSIS
∙ Entering Information
∙ Viewing Saved Information
∙ Searching of information
∙ Modification of information
∙ Deletion of information
5
HARDWARE AND SOFTWARE
REQUIREMENTS
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
6
SOURCE CODE
∙ CREATE FUNCTION
def create():
try:
import mysql.connector as c
mycon =
c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
print("CREATING STUDENT RECORD TABLE........")
query="create table student(ADMN_No int(4) PRIMARY KEY, Student_Name
varchar(60) NOT NULL, Class_Sec varchar(60) NOT NULL, Date_Of_Admn date
NOT NULL, Date_Of_Birth date NOT NULL, Due_Date date NOT NULL, Fine
Varchar(60), Remarks varchar(60))"
cursor.execute(query)
mycon.commit()
print("Created 'STUDENT' table",end="\n")
print()
except:
7
print("PROBLEM IN CREATING",end="\n")
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
cursor.execute("show tables")
for i in cursor:
print(i)
print()
except:
print("ERROR IN SHOWING TABLES")
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
table=input("Enter Table Name: ")
cursor.execute("describe "+table+"")
for i in cursor:
print(i)
print()
8
except:
print("ERROR IN DESCRIBING TABLE")
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
cursor.execute("select * from student")
data=cursor.fetchall()
print("ADMN NUMBER","STUDENT NAME","CLASS/SEC","DATE OF
ADMISSION", "DUE DATE FOR FINES","STUDENT DATE OF BIRTH","FINE (IF
ANY)","REMARK (IF ANY)", sep="\t")
for i in data:
for j in i:
print(j,end="\t\t")
except:
print("ERROR IN DISPLAYING CONTENTS OF TABLE")
∙ INSERT FUNCTION
def insert():
try:
import mysql.connector as c
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
R=int(input("ENTER ADMN NUMBER: "))
9
N=input("ENTER STUDENT NAME: ")
P=input("ENTER CLASS/SEC: ")
∙ SEARCH FUNCTION
def search():
try:
import mysql.connector as c
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
admn=int(input("ENTER ADMN NUMBER OF STUDENT WHOSE RECORD
TO BE SELECTED: "))
query="select * from student where ADMN_No='"+str(admn)+"'"
cursor.execute(query)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND")
10
else:
print(data)
except:
print("ERROR IN SEARCHING RECORDS FROM TABLE")
∙ DELETE FUNCTION
def delete():
try:
import mysql.connector as c
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
admn=input("ENTER ADMN NUMBER OF THE RECORD YOU WANT TO
DELETE: ")
query="select * from student where ADMN_No="+admn+""
cursor.execute(query)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT RECORD NOT FOUND IN TABLE")
else:
qry="delete from student where ADMN_No="+admn+""
cursor.execute(qry)
mycon.commit()
11
∙ UPDATE FUNCTION
def update():
try:
import mysql.connector as c
mycon=c.connect(host="localhost",user="root",passwd="tiger",database="samar")
cursor=mycon.cursor()
admn=input("ENTER ADMN NUMBER OF STUDENT WHOSE RECORD IS
TO BE UPDATED: ")
qry="select * from student where ADMN_No="+admn+ " "
cursor.execute(qry)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND")
else:
# R=input("ENTER UPDATED ADMN NUMBER: ")
N=input("ENTER UPDATED STUDENT NAME: ")
P=input("ENTER UPDATED CLASS/SEC: ")
A=input("ENTER UPDATED DATE OF ADMN: ")
B=input("ENTER UPDATED DATE OF BIRTH: ")
C=input("ENTER UPDATED DUE DATE: ")
D=input("ENTER UPDATED FINE(IF ANY): ")
qry="update student set Student_Name='"+N+"', Class_Sec='"+P+"',
Date_Of_Admn='"+A+"', Date_Of_Birth='"+B+"', Due_Date='"+C+"',Fine='"+D+"'
where ADMN_NO="+admn+" "
cursor.execute(qry)
mycon.commit()
print("STUDENT RECORD UPDATED")
except:
print("SORRY SOME ERROR OCCURRED")
12
∙ MENU FOR SCHOOL MANAGEMENT SYSTEM SOFTWARE
#MENU FOR SCHOOL MANAGEMENT SYSTEM SOFTWARE
print("*************************************************")
print(" WELCOME TO MY SCHOOL MANAGEMENT SYSTEM")
print("*************************************************")
print()
while True:
print()
print()
print("CHOICE 1 : TO CREATE TABLE (ONLY ONE TIME)")
# print("CHOICE 2 : TO DISPLAY TABLES OF DATABASE")
print("CHOICE 2 : TO SHOW FIELDS OF TABLE")
print("CHOICE 3 : TO DISPLAY ALL DATA OF THE TABLE")
print("CHOICE 4 : TO ADD NEW STUDENT")
print("CHOICE 5 : TO SEARCH A STUDENT'S RECORD")
print("CHOICE 6 : TO CHANGE THE RECORD OF A STUDENT")
print("CHOICE 7 : TO DELETE RECORD OF A STUDENT")
print("CHOICE 8 : EXIT")
print()
ch=int(input("ENTER YOUR CHOICE:"))
#Creating table for the first time
if ch==1:
create()
#Displaying tables of database
# elif ch==2:
# displaytables()
#Displaying Tables fields
elif ch==2:
describetable()
#Displaying all records of table
13
elif ch==3:
displayall()
#inserting new record into table
elif ch==4:
insert()
#searching student details
elif ch==5:
search()
#To update student record
elif ch==6:
update()
# Delete student record from table
elif ch==7:
delete()
#Exit from program
elif ch==8:
exit()
# If the user enters invalid choice
else:
print('Invalid choice')
mycon.close()
×-×-×-×-×-×-×-×-×-×-×-×-×-×-×-×-×-×-×-×
14
OUTPUT
15
16
17
18
19
20
21
22
23
24
25
BIBLIOGRAPHY
3) GOOGLE.COM
26