CENTRAL BOARD OF SECONDARY EDUCATION
PROJECT REPORT
STUDENT DATABASE MANAGEMENT
Submitted by:
Name : R.Aswathi
Class & Sec : XII - B2
Roll No : CC12A02
School Name : Ology Tech School
ACADEMIC YEAR 2025-26
CERTIFICATE
This is to certify that the project work entitled
“STUDENT DATABASE MANAGEMENT” submitted
by R.Aswathi of Class XII-B2, Roll No CC12A02,
during the academic year 2025-26 is a bonafide
record of work carried out under my guidance.
Computer Science Teacher: Ms. Jayaprabha
Principal: ________________________
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to my
Computer Science teacher, Ms. Jayaprabha, for her
valuable guidance and encouragement throughout
this project. I would also like to thank my school,
Ology Tech School, for providing the necessary
facilities to successfully complete this project.
R.Aswathi
TABLE OF CONTENTS
1. Introduction
2. Objectives
3. Methodology
4. Source Code
5. Output Screens
6. Conclusion
7. Bibliography
INTRODUCTION
The Student Database Management System is a
simple project developed using Python and
SQLite. It allows adding, viewing, updating,
deleting, and searching student records efficiently.
This project demonstrates the use of database
connectivity with Python.
OBJECTIVES
1. To understand database management using
Python.
2. To perform basic CRUD operations (Create,
Read, Update, Delete).
3. To gain practical knowledge of SQLite
connectivity.
4. To develop problem-solving and programming
skills.
METHODOLOGY
1. Importing the required libraries.
2. Connecting to the SQLite database.
3. Creating a students table.
4. Writing functions for CRUD operations.
5. Displaying a menu-driven interface for users.
SOURCE CODE
import sqlite3
# Connect to SQLite database (or create it)
conn = sqlite3.connect("student_db.sqlite")
cursor = conn.cursor()
# Create table if not exists
cursor.execute('''
CREATE TABLE IF NOT EXISTS students (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
age INTEGER,
grade TEXT
)
''')
conn.commit()
# Add a new student
def add_student(name, age, grade):
cursor.execute("INSERT INTO students (name,
age, grade) VALUES (?, ?, ?)", (name, age, grade))
conn.commit()
print("Student added successfully.")
# View all students
def view_students():
cursor.execute("SELECT * FROM students")
for row in cursor.fetchall():
print(row)
# Search student by ID
def search_student(student_id):
cursor.execute("SELECT * FROM students
WHERE id = ?", (student_id,))
result = cursor.fetchone()
if result:
print(result)
else:
print("Student not found.")
# Update student details
def update_student(student_id, name, age, grade):
cursor.execute("UPDATE students SET name = ?,
age = ?, grade = ? WHERE id = ?", (name, age,
grade, student_id))
conn.commit()
print("Student updated successfully.")
# Delete a student
def delete_student(student_id):
cursor.execute("DELETE FROM students
WHERE id = ?", (student_id,))
conn.commit()
print("Student deleted successfully.")
# Menu
def menu():
while True:
print("\n--- Student Database Menu ---")
print("1. Add Student")
print("2. View All Students")
print("3. Search Student by ID")
print("4. Update Student")
print("5. Delete Student")
print("6. Exit")
choice = input("Enter your choice: ")
if choice == '1':
name = input("Enter name: ")
age = int(input("Enter age: "))
grade = input("Enter grade: ")
add_student(name, age, grade)
elif choice == '2':
view_students()
elif choice == '3':
student_id = int(input("Enter student ID to
search: "))
search_student(student_id)
elif choice == '4':
student_id = int(input("Enter student ID to
update: "))
name = input("Enter new name: ")
age = int(input("Enter new age: "))
grade = input("Enter new grade: ")
update_student(student_id, name, age,
grade)
elif choice == '5':
student_id = int(input("Enter student ID to
delete: "))
delete_student(student_id)
elif choice == '6':
print("Exiting...")
break
else:
print("Invalid choice. Please try again.")
menu()
# Close connection on exit
conn.close()
OUTPUT SCREENS
Output Screen 1:
Output Screen 2:
Output Screen 3:
Output Screen 4:
Output Screen 5:
CONCLUSION
This project helped in understanding how Python
can be integrated with databases such as SQLite. It
provided hands-on experience in performing
CRUD operations and developing menu-driven
applications. Through this project, problem-
solving skills and logical thinking were enhanced.
BIBLIOGRAPHY
1. Python Documentation -
https://docs.python.org/
2. SQLite Documentation -
https://www.sqlite.org/docs.html
3. CBSE Computer Science Textbook (Class XII)