Cs Project
Cs Project
We declare that the work presented in this project titled "STUDENT MAMANGEMENT SYSTEM",
submitted to Mr. Akshay Varshney PGT - Computer Science, Army Public School, LBS Marg for the award
of CBSE-AISSCE class XII certificate.
For the support and correctness of our work we have attached a plagiarism report from Grammarly.com which
is an open-source plagiarism checker and it is according to specifications provided by CBSE.
BY:
2
CERTIFICATE
It is certified that the work contained in the project titled "STUDENT MANAGEMENT SYSTEM", by
"Abhay Chauhan, Akash Yadav, Ankit Pandey", has been carried out under my supervision and that this was
has not been submitted elsewhere for a AISSCE certificate.
PRINCIPAL
Project Guide:
___________________
3
ACKNOWLEDGEMENT
We would like to thank Mrs. Sadhana Devi, Principal, Army Public School, LBS Marg Lucknow who gave
us this golden opportunity to do this work and are deeply indebted to our mentor Mr. Akshay Varshney for
project guidance.
We further say thanks to all the members of Army Public School, LBS marg. We also express our deepest
gratitude to our parents and our friends, as project is a bridge between theoretical and practical learning and
with this thinking we worked on the project and made it successful in a given amount of time.
4
CONTENT
1. Introduction
2. System Requirements
3. Coding
4. Outcomes
5. References
5
INTRODUCTION
Project Description
A Student Management System created using MySQL and Python aims to efficiently manage student data,
including enrolment, grades, attendance, generation of transfer certificate and fee receipts and other required
information. The objective is to create a comprehensive system that enables educational institutions to manage
student-related data effectively. The system will provide functionalities for administrators, teachers, and
students to interact with the database, allowing for seamless information retrieval, updates, and monitoring of
student progress.
METHODOLOGY
The project starts with 'Menu based Input' asked from user as-
• PRESS 1: New admission→ In new admission, we admit a student into our institution with given their
name. class, section. Admission Number, Contact, Address, and other details. In the end, a confirmation
message is also indicated if the student is enrolled.
• PRESS 2: Display student's data→ In Display Student's Data, details of all the students are displayed
on the screen in the comma separated format in tuples.
• PRESS 3: Update student's data→ In this, we can update name, class and roll number of a student
withthe help of his admission number.
• PRESS 4: Issue transfer certificate→ In issue transfer certificate, if a student is leaving the institute then
we issue him the transfer certificate, along with this his details are also removed from the records of the
institute.
• PRESS 5: Add students’ marks detail→ In this, all the marks of the student are updated on the software
to hand out the marksheet and display their overall performance. At last, a confirmation message is
indicated if the marks are fully updated.
• PRESS 6: Generate all students’ report card→ In generating all students' report cards, it issues the
mark details and percentage of all the students on the screen.
• PRESS 7: Generate student-wise report card→ If we want to issue mark details individually, then we
can use this to get the mark details along with the percentage.
• PRESS 8: Pay student’s fee→ We update the fee details like the fee for the various categories such as
tuition fee, etc., and the quarter of submission. When the fee is accepted, a confirmation message is
indicated.
• PRESS 9: Generate student-wise fee receipt→ It generates the student-wise fee receipt along with the
fee amount and the quarter of submission.
6
SYSTEM REQUIREMENTS
Note: MySQL Connector Python requires python to be in the system's PATH. Installation fails if it doesn't
find Python.
On Windows, If Python doesn't exist in the system's path, please manually add the directory containing
python.exe yourself.
7
ROLE OF TEAM MEMBERS
8
CODING
import mysql.connector
import sys
# Function to connect to MySQL server and create the database if it does not exist
def connect_db():
try:
connection = mysql.connector.connect(
host="localhost",
cursor = connection.cursor()
connection.database = "study"
return connection
def setup_tables(conn):
cursor.execute("""
9
ID INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50),
fname varchar(60),
mname varchar(60),
contact_no int(10),
emergency_no int(10),
age INT,
class VARCHAR(10),
grade VARCHAR(5),
""")
cursor.execute("""
student_id INT,
subject VARCHAR(50),
marks INT,
)""")
cursor.execute("""
student_id INT,
payment_date DATE,
)""")
conn.commit()
def continue_prompt(action_description):
10
while True:
if choice == 'y':
return True
return False
else:
def add_student(conn):
cursor.execute("INSERT INTO students (name, fname, mname, contact_no, emergency_no, age, class,
grade) VALUES (%s, %s, %s, %s,%s, %s, %s, %s)",
conn.commit()
if not continue_prompt("add"):
return
def view_student_details(conn):
11
with conn.cursor() as cursor:
while True:
choice = input("\nView details of (1) All students or (2) Specific student? Enter 1 or 2: ")
if choice == '1':
cursor.execute("SELECT ID, name, fname, mname, contact_no, emergency_no, age, class, grade
FROM students WHERE transferred = FALSE")
results = cursor.fetchall()
if results:
for (ID, name, fname, mname, contact_no, emergency_no, age, student_class, grade) in results:
else:
cursor.execute("SELECT ID, name, fname, mname, contact_no, emergency_no, age, class, grade
FROM students WHERE ID = %s AND transferred = FALSE", (student_id,))
result = cursor.fetchone()
if result:
(ID, name, fname, mname, contact_no, emergency_no, age, student_class, grade) = result
else:
else:
12
continue
if not continue_prompt("view"):
break
def update_student_record(conn):
while True:
fname=input("Enter the father's name that is to be updated: ") #this syntax only because "enter new
father's name" would look a bit inappropriate
mname=input("Enter the mother's name that is to be updated: ") #this syntax only as "enter new
mother's name" would look a bit inappropriate
conn.commit()
if cursor.rowcount > 0:
else:
if not continue_prompt("update"):
break
def transfer_certificate(conn):
13
while True:
conn.commit()
if cursor.rowcount > 0:
student_details = cursor.fetchone()
if student_details:
else:
break
def update_or_add_result(conn):
while True:
existing_results = cursor.fetchall()
if existing_results:
14
for (subject, marks) in existing_results:
else:
existing_subject = cursor.fetchone()
if existing_subject:
action_choice = input("Press (1) to Update existing marks or (2) to Add a new record for this
subject: ").strip()
if action_choice == '1':
conn.commit()
cursor.execute("INSERT INTO results (student_id, subject, marks) VALUES (%s, %s, %s)",
conn.commit()
15
print(f"New record added for {subject} with marks: {marks}.")
else:
else:
cursor.execute("INSERT INTO results (student_id, subject, marks) VALUES (%s, %s, %s)",
conn.commit()
break
def generate_result(conn):
while True:
choice = input("\nGenerate result for (1) All students or (2) Specific student? Enter 1 or 2: ")
if choice == '1':
continue
if not continue_prompt("generate"):
break
def fee_payment(conn):
while True:
payment_date = datetime.now().date()
cursor.execute("INSERT INTO fees (student_id, amount, payment_date) VALUES (%s, %s, %s)",
conn.commit()
break
def generate_fee_receipt(conn):
while True:
choice = input("\nGenerate fee receipt for (1) All students or (2) Specific student? Enter 1 or 2: ")
if choice == '1':
else:
continue
if not continue_prompt("generate"):
break
# Main Screen
print("###################################################################")
print("\n | TO |")
print("\n |-------------------------------------------------------------|")
print("\n |-------------------------------------------------------------|")
print("###################################################################")
18
# Main function to drive the program
def main():
conn = connect_db()
setup_tables(conn)
while True:
print("|----------------------------------------------------------|")
print("|----------------------------------------------------------|")
if choice == '1':
add_student(conn)
view_student_details(conn)
update_student_record(conn)
transfer_certificate(conn)
update_or_add_result(conn)
fee_payment(conn)
generate_fee_receipt(conn)
break
else:
conn.close()
if __name__ == "__main__":
main()
20