0% found this document useful (0 votes)
68 views18 pages

Lucknow Public School & College

Uploaded by

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

Lucknow Public School & College

Uploaded by

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

Lucknow Public School & College

Computer Science Project


2024-25
Project Topic: Student Management System
Submitted by:
Name: Shubh Dwivedi
Class & Sec: XII B
CBSE Roll No:
Under the Guidance of: Mrs. Ritu Kapoor (C.S)

1
Certificate
This is to certify that Shubh Dwivedi of Class 12 B, has
successfully completed the project titled “Student
Management System” under the guidance of Mrs. Ritu
Kapoor, in partial fulfilment of the requirements for the
Computer Science subject during the academic session
2024-2025.
This project is an original piece of work carried out by the
student and has been completed as per the guidelines
issued by Lucknow Public School & College and the
Central Board of Secondary Education (CBSE).
We wish them all the best for their future endeavours.

Internal Examiner External Examiner

Principal

2
Acknowledgement
I would like to express my heartfelt gratitude to all those
who helped me complete this project, titled “Student
Management System”.
First and foremost, I am deeply thankful to Mrs. Ritu
Kapoor, My Computer Science teacher, for providing me
with invaluable guidance, continuous support, and
encouragement throughout the course of this project. Their
insights and suggestions helped me immensely in
improving the quality of this work.
I am also grateful to Mrs. Anita Choudhary, the principal of
Lucknow Public School, for giving me the opportunity to
work on this project and for providing all the necessary
resources and facilities.
I would like to thank my parents and friends for their
constant encouragement and moral support, which
motivated me to complete this project successfully.
Lastly, I acknowledge the Central Board of Secondary
Education (CBSE) for setting such enriching and
challenging projects that enhance our knowledge and
practical understanding.
Thank you all.

3
Hardwares and Softwares Required

Hardwares:
1. Desktop Computer/Laptop
2. Mobile Phone
Software:
1. Python (3.11.9) (Latest Version)
2. My SQL
3. My SQL – Connector – Python Module

4
Contents

S. No. Topic Page No.


1. Certificate 2

2. Acknowledgement 3

3. Hardware’s & 4
Software’s Required
4. Introduction 6-10

5. Python Source 11-12


Code
6. My SQL Database 13

7. Outputs 14-17

8. Bibliography

5
Introduction
The "Student Management System" is a comprehensive software
application developed to manage and organize student data
e iciently. This project is aimed at simplifying administrative tasks
in educational institutions by o ering an intuitive and user-friendly
platform to handle various student-related processes. The system
allows for easy storage, updating, retrieval, and management of
student information such as personal details, academic
performance, attendance records, and more.
In traditional systems, managing student data manually can be
time-consuming, prone to errors, and ine icient. This project
leverages modern computing techniques to eliminate these
challenges by automating critical functions like student
registration, grade management, and attendance tracking. With
role-based access for administrators, teachers, and students, the
system ensures data security and privacy.
The Student Management System is designed with a focus on
scalability, enabling it to adapt to institutions of varying sizes, from
schools to colleges. It supports real-time data management,
ensuring that any updates are immediately reflected across the
system. Additionally, the project aims to enhance communication
between students and teachers by integrating features like
assignment tracking and notifications for upcoming events or
exams.
Overall, this system streamlines the workflow of educational
institutions, improving both administrative e iciency and the
academic experience for students and sta alike.

6
Functions Used in the program:
1. connect_to_db()
 Purpose: This function is used to establish a connection
between the Python program and the MySQL database.
 Explanation:
o It uses the mysql.connector.connect() method to
connect to the MySQL database by providing
parameters like host, user, password, and database.
o If the connection is successful, the function returns the
connection object, which is used to interact with the
database.
o If there's any error (such as wrong credentials or a
connection issue), it catches the exception and prints
an error message.
2. add_student()
 Purpose: This function adds a new student’s details to the
database.
 Explanation:
o It first connects to the database using connect_to_db().
o Then it takes input from the user for the student's
name, age, grade, and email.
o Using the INSERT INTO SQL query, the function inserts
the new student's data into the students table.
o After executing the query, it commits the transaction
(i.e., saves the changes to the database).

7
3. view_students()
 Purpose: This function retrieves and displays all student
records from the database.
 Explanation:
o It connects to the database, then executes the SELECT
* FROM students SQL query to fetch all student data.
o It fetches the results using cursor.fetchall() and iterates
through the results to display each student's details
(ID, name, age, grade, and email).
o The function prints a formatted list of all students in the
database.
4. view_student_details()
 Purpose: This function allows users to retrieve and display
the details of a specific student from the database based on
their unique student ID.
 Explanation:
o It prompts the user to enter a student ID, then
connects to the MySQL database.
o The function executes a SELECT SQL query to find the
student with the corresponding ID.
o If found, it retrieves and displays the student's details,
including their name, age, grade, and email. If no
matching ID is found, it informs the user accordingly.
o Error handling is included to manage any database
connection or query execution issues.

8
5. update_student()
 Purpose: This function updates the details of an existing
student in the database.
 Explanation:
o It first connects to the database, asks the user to
provide the student ID of the student whose details
need to be updated, and then prompts the user to
enter the new values for name, age, grade, and email.
o The function uses an UPDATE SQL query to update the
student's information based on the provided student
ID.
o After executing the update query, it commits the
changes to the database.
6. delete_student()
 Purpose: This function deletes a student record from the
database based on the student’s ID.
 Explanation:
o It connects to the database and asks the user to input
the student ID of the student they want to delete.
o The function uses a DELETE FROM SQL query to remove
the student with the corresponding ID from the students
table.
o Once the query is executed, it commits the changes
(deletes the record) to the database.

9
7. menu()
 Purpose: This function provides an interactive menu for the
user to select di erent operations like adding, viewing,
updating, or deleting student records.
 Explanation:
o It runs an infinite while loop to display a menu with
options.
o Based on the user’s input, it calls the appropriate
function (add_student(), view_students(),
update_student(), or delete_student()).
o If the user chooses the exit option (option 5), the loop
breaks, and the program terminates.

Conclusion:
 Main Functionality:
o The system supports basic CRUD (Create, Read,
Update, Delete) operations on a student database.
 SQL Integration:
o The program uses MySQL as the database backend, and
each function handles di erent SQL queries like
INSERT, SELECT, UPDATE, and DELETE.
 User Input:
o Functions collect data from the user through the
console and execute the corresponding database
actions.

10
Python Source Code

11
12
My SQL Database
Database:

Table:

13
Outputs
#Add Student Details:

14
Table in MySQL:

#View All Students:

#View Student Details:

15
#Update Student Details:

Table updated in MySQL:

16
#Delete a Student:

Table updated in MySQL:

#Exiting the Program:

17
BIBLIOGRAPHY
1. Python:
https://www.python.org/
2. MySQL:
https://www.mysql.com/
3. Class 11th C.S Book (Preeti Arora)
4. Class 12th C.S Book (Sumita Arora)

18

You might also like