67% found this document useful (3 votes)
1K views

Student Marks Management System

This document is a project report on a Student Marks Management System created by Krishna Sahu, a class 12 student. The project uses SQL and Python to create a database to add, update, delete and search student records. It allows adding new students, updating marks, deleting records, and searching by roll number or name. The project was guided by Mr. Vimal Kumar Singh and certifies that Krishna Sahu successfully completed the project. It also includes the hardware and software requirements and bibliography used to make the project.

Uploaded by

Krishna Sahu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
1K views

Student Marks Management System

This document is a project report on a Student Marks Management System created by Krishna Sahu, a class 12 student. The project uses SQL and Python to create a database to add, update, delete and search student records. It allows adding new students, updating marks, deleting records, and searching by roll number or name. The project was guided by Mr. Vimal Kumar Singh and certifies that Krishna Sahu successfully completed the project. It also includes the hardware and software requirements and bibliography used to make the project.

Uploaded by

Krishna Sahu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

ANIL SARASWATI VIDYA MANDIR SR.SEC.

SCHOOL

ACADEMIC YEAR : 2021-22

PROJECT REPORT ON

STUDENT MARKS MANAGEMENT SYSTEM

ROLL NO : 23604497

NAME : Krishna Sahu

CLASS : XII

SUBJECT : Informatics Practices

SUB CODE : 065

PROJECT GUIDE: Mr Vimal Kumar Singh Sir

Anil Saraswati Vidya Mandir School

Saket Faizabad Distt.Ayodhya U.P. 224001


ANIL SARASWATI VIDYA MANDIR SR.SEC.SCHOOL

CERTIFICATE

This is to certify that Cadet Krishna Sahu Roll No: 23604497 has

successfully completed the project Work entitled STUDENT MARKS

MANAGEMENT SYSTEM in the subject Informatics Practices (065) laid down in the

regulations of CBSE for the purpose of Practical Examination in Class XII to

be held in Anil Saraswati Vidya Mandir Sr.Sec. School on______________.

(Mr.Vimal Kumar Singh)

Examiner:

Name: _______________

Signature:
PROJECT ON STUDENT MARKS MANAGEMENT
SYSTEM

This project is designed to add a new student,


update marks or details of existing student,
delete details or to delete the whole table; it
is also capable of searching a student’s
details.

This project is made by SQL DBMS and Python


connectivity using “mysql.connector” module.
The module “sys” is used to provide access to
some variables used or maintained by the
interpreter and to functions that interact
strongly with interpreter.
CODING
#STUDENTS MARKS MANAGEMENT
import mysql.connector as sql
import sys

#connect to mysql database


db=sql.connect(host="localhost",user="root",passwd="ajaysh
arma08",database="mysql")
cursor=db.cursor()
#check database is connected
if db.is_connected():
print("Database connected")

#MENU FOR STUDENT MARKS MANAGEMENT SYSTEM


SOFTWARE
print("*********************************************
****")
print("WELCOME TO MY PROJECT STUDENT MARKS
MANAGEMENT SYSTEM")
print("*********************************************
****")
print()
while(1):
print("1:TO CREATE TABLE FOR THE FIRST TIME")
print("2:TO DISPLAY TABLES OF DATABASE")
print("3:TO SHOW FIELDS OF TABLE")
print("4:TO DISPLAY ALL DATA")
print("5:TO ADD NEW STUDENT")
print("6:TO SEARCH A STUDENT RECORD")
print("7:TO CHANGE MARKS OF STUDENT")
print("8:TO DELETE STUDENT ")
print("9:EXIT")
print()
ch=int(input("ENTER YOUR CHOICE"))
#Creating table for the first time
if ch==1:
try:
print(" Creating STUDENT table")
sql = "CREATE TABLE student(ROLL int(4) PRIMARY
KEY,name varchar(15) NOT NULL,class char(3) NOT NULL,sec
char(1),mark1 int(4),mark2 int(4),mark3 int(4),mark4
int(4),mark5 int(4),total int(4),per float(4));"
cursor.execute(sql)
mycon.commit()
except:
print("sorry some error occured")
#Displaying tables of database
if ch==2:
try:
cursor.execute("show tables")
for i in cursor:
print(i)
except:
print("sorry some error occured")
#Displaying Tables fields
if ch==3:
try:
table=input("enter table name")
cursor.execute("desc %s"%table)
for i in cursor:
print(i)
except:
print("sorry some error occured")
#Displaying all records of table
if ch==4:
try:
cursor.execute("select * from student")
data=cursor.fetchall()
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")
#inserting new record into table
if ch==5:
r=int(input("Enter student roll number"))
name=input("ENTER STUDENT NAME")
c=input("ENTER CLASS OF STUDENT")
s=input("ENTER SECTION OF STUDENT")
m1=int(input("ENTER MARKS IN SUBJECT1"))
m2=int(input("ENTER MARKS IN SUBJECT2"))
m3=int(input("ENTER MARKS IN SUBJECT3"))
m4=int(input("ENTER MARKS IN SUBJECT4"))
m5=int(input("ENTER MARKS IN SUBJECT5"))
t=m1+m2+m3+m4+m5
per=t/5
query="insert into student
values(%d,'%s','%s','%s',%d,%d,%d,%d,%d,%d,%d)"%(r,name,
c,s,m1,m2,m3,m4,m5,t,per)
cursor.execute(query)
print("STUDENT RECORD SAVED IN TABLE")
db.commit()
#searching student details
if ch==6:
print("1:TO SERACH BY STUDENT ROLL NUMBER")
print("2:TO SEARCH BY STUDENT NAME")
c=int(input("ENTER YOUR CHOICE"))
#searching by student roll number
if c==1:
try:
roll=int(input("ENTER STUDENT ROLL NUMBER TO
SEARCH"))
qry="select * from student where roll=%d"%roll
cursor.execute(qry)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND")
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")

#searching by student name


if c==2:
try:
name=input("ENTER STUDENT NAME TO SEARCH")
qry="select * from student where
name='%s'"%name
cursor.execute(qry)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND")
print("ROLL NO","STUDENT
NAME","CLASS","SECTION","SUBJECT1","SUBJECT2","SUBJEC
T3","SUBJECT4","SUBJECT5","TOTALMARKS","PERCENTAGE")
for i in data:
j=str(i).split()
for k in j:
print(k,end=" ")
print()
except:
print("SORRY SOME ERROR OCCURED")

#TO update student marks


if ch==7:
try:
roll=int(input("ENTER ROLL NUMBER OF STUDENT
WHOSE MARKS TO BE UPDATE"))
qry="select * from student where roll=%d"%roll
cursor.execute(qry)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND")
else:
m1=int(input("ENTER UPDATED MARKS IN
SUBJECT1"))
m2=int(input("ENTER UPDATED MARKS IN
SUBJECT2"))
m3=int(input("ENTER UPDATED MARKS IN
SUBJECT3"))
m4=int(input("ENTER UPDATED MARKS IN
SUBJECT4"))
m5=int(input("ENTER UPDATED MARKS IN
SUBJECT5"))
t=m1+m2+m3+m4+m5
per=t/5
qry="update STUDENT SET
mark1=%d,mark2=%d,mark3=%d,mark4=%d,mark5=%d,total
=%d,per=%d where roll=%d"%(m1,m2,m3,m4,m5,t,per,roll)
cursor.execute(qry)
print("STUDENT RECORD UPDATED")
db.commit()
except:
print("SORRY SOME ERROR OCCURED")

# Delete student record from table


if ch==8:
try:
roll=int(input("ENTER STUDENT ROLL NUMBER ,YOU
WANT TO DELETE"))
qry="select * from student where roll=%d"%roll
cursor.execute(qry)
data=cursor.fetchall()
if len(data)==0:
print("STUDENT NOT FOUND IN TABLE")
else:
qry="delete from student where roll=%d"%(roll)
cursor.execute(qry)
print("STUDENT RECORD DELETED FROM TABLE")
db.commit()
except:
print("SORRY SOME ERROR OCCURED")

#Exit from program


if ch==9:
sys.exit()

db.close()
OUTPUT
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 7 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUAL CORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIA K8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : [for Hard copy]

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python
.BIBLIOGRAPHY

1. Computer science With Python - Class XII By : Sumita Arora


2. Website: https://www.w3resource.com

***

You might also like