0% found this document useful (0 votes)
26 views

COMPUTER SCIENCE PROJECT CLASS 12

Uploaded by

10manishrathod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

COMPUTER SCIENCE PROJECT CLASS 12

Uploaded by

10manishrathod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Kendriya Vidyalaya Naval Base Karwar

2024-25

A

PROJECT REPORT ”
ON
STUDENT MANAGEMENT SYSTEM

SUBMITTED IN PARTIAL FULFILLMENT OF THE


REQUIREMENT FOR THE AWARD OF THE
SESSION ENDING EXAM – 2024-25

Submitted to: - Submitted by: -


KAJAL KASHYAP NITISH KUMAR
PGT-Computer Science Class;-12 A
KV Karwar KV Karwar
KENDRIYA VIDYALAYA
KARWAR
DEPARTMENT OF COMPUTER SCIENCE
CERTIFICATE
This is to certify that Master NITISH KUMAR , a student of class
XII A has successfully completed the research on the below
mentioned project under the guidance of Mrs.Kajal Kashyap
(PGT- COMPUTER SCIENCE KV KARWAR) during the year 2024-25 in
partial fulfilment of Computer Science Practical Examination
conducted by AISSCE, New Delhi.

Signature of Computer Science Teacher Signature of External Examiner

Signature of Principal School Stamp


ACKNOWLEDGEMENT

In the accomplishment of this project successfully, many people


have best owned upon me their blessings and the heart pledged
support, this time I am utilizing to thank all the people who have
been concerned with project.

Primarily I would thank god for being able to complete this


project with success. Then I would like to thank My Computer
Science Teacher Mrs. Kajal Kashyap whose valuable guidance has
been the ones that helped me patch this project and make it full
proof success his suggestions and his instructions has served as
the major contributor towards the completion of the project.

Then I would like to thank my parents and friends who have


helped me with their valuable suggestions and guidance has
been helpful in various phases of the completion of the project.

Last but not the least I would like to thank my classmates who
have helped me a lot.
INDEX
➢ Certificate
➢ Acknowledgement
➢ Introdcution
➢ Hardware And Software
➢ Software Development Lifecycle
➢ Source Code
➢ Output
➢ Database Connector Output
➢ Bibliography
INTRODUCTION
Student management systems make faculty jobs more
accessible by giving them an easy place to find and sort
information. This system allows teachers and student
managers to follow with their student engagement.

The idea is to create a scenario that makes the lives of


administration and teachers easier.

ABOUT PROGRAM:- Write a program to build a simple Student


Management System using Python which can perform the
following operations:
1. Adding Student
2. Update Student
3. Delete Student
4. Search Student
5. Display Student
6. Exit
Hardware and Software
1.HARDWARE:

✓ Processor

✓ Keyboard

✓ Minimum memory - 2GB


2.SOFTWARE:

✓ Operating System –OS7, OS8

✓ Python IDLE

✓ MYSQL
Software Development Lifecycle
SOURCE CODE
import mysql.connector

def display_menu():

print("1. Add Student")

print("2. Update Student")

print("3. Delete Student")

print("4. Search Student")

print("5. Display Students")

print("6. Exit")

def connect_to_database():

try:

connection = mysql.connector.connect(

host="localhost",

user="root",

password="root",

database="siddhesh"

print("Connected to database successfully!")

return connection

except mysql.connector.Error as error:

print("Failed to connect to database:", error)

def create_table(cursor):
table_query = """

CREATE TABLE IF NOT EXISTS siddhesh (

admno INT PRIMARY KEY,

name VARCHAR(100),

course VARCHAR(50),

fees FLOAT,

dob DATE

"""

cursor.execute(table_query)

print("Table created successfully!")

def add_student(connection, cursor):

admno = int(input("Enter Admission Number: "))

name = input("Enter Name: ")

course = input("Enter Course: ")

fees = float(input("Enter Fees: "))

dob = input("Enter Date of Birth (YYYY-MM-DD): ")

insert_query = """

INSERT INTO siddhesh (admno, name, course, fees, dob)

VALUES (%s, %s, %s, %s, %s)

"""

values = (admno, name, course, fees, dob)

cursor.execute(insert_query, values)

connection.commit()

print("Student added successfully!")


def update_student(connection, cursor):

admno = int(input("Enter Admission Number of student to update: "))

update_query = """

UPDATE siddhesh

SET name = %s, course = %s, fees = %s, dob = %s

WHERE admno = %s

"""

name = input("Enter Name: ")

course = input("Enter Course: ")

fees = float(input("Enter Fees: "))

dob = input("Enter Date of Birth (YYYY-MM-DD): ")

values = (name, course, fees, dob, admno)

cursor.execute(update_query, values)

connection.commit()

if cursor.rowcount > 0:

print("Student updated successfully!")

else:

print("No student found with Admission Number:", admno)

def delete_student(connection, cursor):

admno = int(input("Enter Admission Number of student to delete: "))

delete_query = """
DELETE FROM siddhesh

WHERE admno = %s

"""

cursor.execute(delete_query, (admno,))

connection.commit()

if cursor.rowcount > 0:

print("Student deleted successfully!")

else:

print("No student found with Admission Number:", admno)

def search_student(cursor):

admno = int(input("Enter Admission Number of student to search: "))

search_query = """

SELECT * FROM siddhesh

WHERE admno = %s

"""

cursor.execute(search_query, (admno,))

result = cursor.fetchone()

if result:

print("Admission Number:", result[0])

print("Name:", result[1])

print("Course:", result[2])

print("Fees:", result[3])
print("Date of Birth:", result[4])

else:

print("No student found with Admission Number:", admno)

def display_students(cursor):

select_query = """

SELECT * FROM siddhesh

"""

cursor.execute(select_query)

result = cursor.fetchall()

if result:

for row in result:

print("Admission Number:", row[0])

print("Name:", row[1])

print("Course:", row[2])

print("Fees:", row[3])

print("Date of Birth:", row[4])

print("--------------")

else:

print("No students found.")

def main():

connection = connect_to_database()

if not connection:

return
cursor = connection.cursor()

create_table(cursor)

while True:

display_menu()

choice = int(input("Enter your choice: "))

if choice == 1:

add_student(connection, cursor)

elif choice == 2:

update_student(connection, cursor)

elif choice == 3:

delete_student(connection, cursor)

elif choice == 4:

search_student(cursor)

elif choice == 5:

display_students(cursor)

elif choice == 6:

break

else:

print("Invalid choice! Please try again.")

connection.close()

print("Database connection closed.")

if __name__ == "__main__":

main()
OUTPUT
DATABASE CONNECTER OUTPUT
BIBLIOGRAPHY
Computer Science with Sumita Arora
Computer Science with Preeti Arora
www.wikipedia.org
Under the guidance of Mrs. Kajal Kashyap
PGT-Computer Science, KV KARWAR

You might also like