Computer Science Pratical COMPLETED
Computer Science Pratical COMPLETED
MANAGEMENT
SYSTEM WITH
PYTHON AND SQLITE
INTEGRATION
1 COMPUTER SCIENCE PROJECT WORK
1
2 COMPUTER SCIENCE PROJECT WORK
Certificate
This is to certify that the project titled “Student Management System with
Python and SQLite Integration” is the original work of Vandan Subhash
Narkhede, a student of Class 12th, A Cambridge International School. This
project was undertaken in partial fulfilment of the computer science curriculum
under the guidance of our computer teacher.
2
3 COMPUTER SCIENCE PROJECT WORK
Acknowledgment
I would like to express my sincere gratitude to my computer teacher for their
constant support and guidance throughout this project. I would also like to thank
my school for providing the resources required for this study on this project.
3
4 COMPUTER SCIENCE PROJECT WORK
HARDWARE
PC
SOFTWARE
Python 3.x
SQLite
SQLite3 Connector for Python
4
5 COMPUTER SCIENCE PROJECT WORK
Introduction
5
6 COMPUTER SCIENCE PROJECT WORK
Objective
The objective of this project is to apply knowledge of Python and SQL to create
a system that performs basic database operations. This project provides practical
experience in using SQL queries within Python to perform CRUD operations
(Create, Read, Update, and Delete) on a database.
6
7 COMPUTER SCIENCE PROJECT WORK
Project Code
import sqlite3
conn = sqlite3.connect('students.db')
cursor = conn.cursor()
age INTEGER,
grade TEXT)''')
conn.commit()
def add_student():
cursor.execute("INSERT INTO students (name, age, grade) VALUES (?, ?, ?)", (name, age, grade))
conn.commit()
def view_students():
students = cursor.fetchall()
7
8 COMPUTER SCIENCE PROJECT WORK
if students:
else:
def update_student():
cursor.execute("UPDATE students SET name = ?, age = ?, grade = ? WHERE id = ?", (name, age, grade,
student_id))
if cursor.rowcount:
conn.commit()
else:
def delete_student():
if cursor.rowcount:
conn.commit()
else:
8
9 COMPUTER SCIENCE PROJECT WORK
def main():
while True:
print("5. Exit")
if choice == '1':
add_student()
view_students()
update_student()
delete_student()
break
else:
main()
9
10 COMPUTER SCIENCE PROJECT WORK
conn.close()
10
11 COMPUTER SCIENCE PROJECT WORK
1. Adding a Student
o Added student: Alice (ID: 1, Age: 15, Grade: 10th)
11
12 COMPUTER SCIENCE PROJECT WORK
12
13 COMPUTER SCIENCE PROJECT WORK
o Displayed records:
(1, 'Alice', 15, '10th')
13
14 COMPUTER SCIENCE PROJECT WORK
14
15 COMPUTER SCIENCE PROJECT WORK
These outputs confirm that the project functions as intended and provides the
basic CRUD operations required for managing student
15
16 COMPUTER SCIENCE PROJECT WORK
Conclusion
16
17 COMPUTER SCIENCE PROJECT WORK
Bibliography
17