Project On School Management-Gautam Arora
Project On School Management-Gautam Arora
Project On School Management-Gautam Arora
School Management
Submitted by:
GAUTAM ARORA
CLASS XII
CERTIFICATE
This is to certify that Gautam Arora of class XII A has prepared the
report on the project entitled “School Management”. The report is the
result of his efforts & endeavors. The report is found worthy of
acceptance as final project report for the subject Computer Science of
Class XII. He has prepared the report under my guidance.
Signature of Examiner
BLUE BELLS MODEL SCHOOL
DECLARATION
GAUTAM ARORA
CLASS XII A
ACKNOWLEDGEMENT
I would like to express a deep sense of thanks & gratitude to my project guide
Mr. Hitesh Goyal sir for guiding me immensely through the course of the project. He
always evinced keen interest in my work. His constructive advice & constant motivation
have been responsible for the successful completion of this project.
My sincere thanks go to Mrs. Alka Saxena. Our principal ma’am, for her co-ordination in
extending every possible support for the completion of this project.
I also thank my parents for their motivation and support. I must thank all my classmates
for their timely help and support for compilation of this project.
Last but not the least, I would like to thank all those who had helped directly or
indirectly towards the completion of this project.
GAUTAM ARORA
CLASS: XII-A
BLUE BELLS MODEL SCHOOL
CONTENTS
1.CERTFICATE -1…………………………………………………………………………
2.CERTFICATE-2…………………………………………………………………………
3.DECLARATION………………………………………………………………………….
4.ACKNOWLEDGEMENT …………………………………………………………….
5.TABLE STRUCTURE………………………………………………………………….
6.CODING ……………………………………………………………………………………
7.INPUT ……………………………………………………………………………………...
8.BIBLIOGRAPHY ……………………………………………………………………....
DBMS: MySQL
Host: localhost
User: root
Password: Gau2002
Database: MySQL
Table: Student
Table: Emp
Table: Fee
Table:Exam
Python Code
import os
import platform
import mysql.connector
def selection():
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
print('-----------------------------------\WELCOME TO SCHOOL MANAGEMENT SYSTEM\-----------------------
------------')
print("1.STUDENT MANAGEMENT")
print("2.EMPLOYEE MANAGEMENT")
print("3.FEE MANAGEMENT")
print("4.EXAM MANAGEMENT")
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 : ")
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
def display1():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
print ("(sname=%s,admno=%d,dob=%s,cls=%s,cty=%s)" % (sname,admno,dob,cls,cty))
except:
print ("Error: unable to fetch data")
db.close()
def update1():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
try:
sql = "Update student set cls=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete1():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
except:
print ("Error: unable to fetch data")
job=c[2]
hiredate=c[3]
print ("(empno=%d,ename=%s,job=%s,hiredate=%s)" % (empno,ename,job,hiredate))
except:
print ("Error: unable to fetch data")
db.close()
def update2():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM emp"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
ename = c[0]
empno= c[1]
job=c[2]
hiredate=c[3]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Employee No : "))
temp=input("Enter new designation : ")
try:
sql = "Update emp set job=%s where empno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete2():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM emp"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
ename = c[0]
empno= c[1]
job=c[2]
hiredate=c[3]
except:
print ("Error: unable to fetch data")
db.commit()
except Exception as e:
print (e)
db.close()
def insert3():
admno=int(input("Enter adm no: "))
fee=float(input("Enter fee amount : "))
month=input("Enter Month: ")
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO fee(admno,fee,month) VALUES ( '%d','%d','%s')"%(admno,fee,month)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display3():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
print ("(admno=%d,fee=%s,month=%s)" % (admno,fee,month))
except:
print ("Error: unable to fetch data")
db.close()
def update3():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
try:
sql = "Update fee set month=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def delete3():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM fee"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
admno= c[0]
fee=c[1]
month=c[2]
except:
print ("Error: unable to fetch data")
temp=int(input("Enter adm no to be deleted : "))
try:
sql = "delete from student where admno='%d'" % (temp)
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute(sql)
db.commit()
except Exception as e:
print (e)
db.close()
def insert4():
sname=input("Enter Student Name : ")
admno=int(input("Enter Admission No : "))
per=float(input("Enter percentage : "))
res=input("Enter result: ")
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql="INSERT INTO exam(sname,admno,per,res) VALUES ( '%s'
,'%d','%s','%s')"%(sname,admno,per,res)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()
def display4():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
print ("(sname,admno,per,res)"%(sname,admno,per,res) )
except:
print ("Error: unable to fetch data")
db.close()
def update4():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
except:
print ("Error: unable to fetch data")
print()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new result : ")
try:
sql = "Update student set res=%s where admno='%d'" % (temp,tempst)
cursor.execute(sql)
db.commit()
except Exceptionn as e:
print (e)
db.close()
def delete4():
try:
db = mysql.connector.connect(user='root', password='Gau2002',
host='localhost',database='mysql')
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
results = cursor.fetchall()
for c in results:
sname = c[0]
admno= c[1]
dob=c[2]
cls=c[3]
cty=c[4]
except:
print ("Error: unable to fetch data")
INSERT DETAILS
!.STUDENT HANAGEHENT
2.EHPLOYEE HANAGEHENT
3.FEE HANAGEHENT
4.EXAH HANAGEHENT
a.NEW ADHISSION
b.UPDATE STUDENT DETAILS
c.ISSUE TC
Enter ur choice (a-c) : a
(sname=Reema,admno=2089,dob=1111-11-11,cls=S,cty=Delhi)
(sname=Jitu,adro
r=2341,dob=2012-01-01,cls=2,cty=Sehore)
(sname=qwerty,adro
r =3456,dob=3333-33-33,cls=3,cty=fghj)
Enter Student Name : Deepak Kumar
Enter Admission No : 2114
Enter Date of Birth(yyyy-rom-dd: 2012-11-07
Enter class for admission: 1
Enter City : Indore
(sname=Reema,admno=2089,dob=1111-11-11,cls=S,cty=Delhi)
(sname=Deepak Kumar,admno=2114rdob=2012-11-07,cls=1,cty=Indore)
(sname=Jitu,adro
r=2341,dob=2012-01-01,cls=2,cty=Sehore)
(sname=qwerty,adro
r =3456,dob=3333-33-33,cls=3,cty=fghj)
>>>
Ln: 39 Col:4
UPDATE DETAILS
1.STUDENT !1ANAGE!1ENT
2.E1 l PLOYEE l-IANAGEHENT
3 .FEE HANAGEHENT
4 • EXAH l-IANAGEHENT
a . NEW ADHISSION
b. UPDATE STUDENT DETAILS
c.ISSUE TC
Enter ur choice (a-c) : b
(snaroe=Reema,a ,o=2089,dob=1111-11-
11,cls=3,cty=Delhi) (sname=nerty,a ,o=3456,dob=3333-
33-33,cls=3,cty=fghj)
(sname=Reema,a ,o=2089,dob=1111-11-
11,cls=5,cty=Delhi) (sname=nerty,a ,o=3456,dob=3333-
33-33,cls=3,cty=fghj)
>>>
Ln:34 Col: 4
DELETE DETAILS
l.STUDENT MANAGEMENT
2.E!1PLOYEE MANAGEMENT
3.FEE MANAGEMENT
4.EXAM MANAGEMENT
a.NEW ADMISSION
b.UPDATE STUDENT DETAILS
c.ISSUE TC
Encr ur choic (a-c) : c
(snarn ·ad,adrnno•ll,dob-1111-11-ll,cls•12,ccy-we)
(snarn •Re ma,adrnno•2089,dob-1111-11-ll,cls•3,ccy-Delh1)
(snarn ·qw rcy,adrnno•3456,dob-3333-33-33,cls•3,ccy-tqhj)
(snarr.·R ma.adrnno•2089,dob-llll-ll-11,cls•3,cey•Delhi)
(snarn ·qw rey,admoo•3456,dob-3333-33-33,cls•3,cey•tqhj)
>>>
Ln:35 Col: 4
By:
GAUTAM ARORA
Bibliography
1. www.google.com
2. www.wikipedia.in