COMPUTER SCIENCE (083)
_______RUonTop_______
Python Programming
● Read a text file line by line and display each word separated by a #.
● Read a text file and display the number of vowels/consonants/uppercase/lowercase characters in the file.
● Remove all the lines that contain the character 'a' in a file and write it to another file.
● Create a binary file with name and roll number. Search for a given roll number and display the name, if not found display appropriate message.
● Create a binary file with roll number, name and marks. Input a roll number and update the marks.
● Write a random number generator that generates random numbers between 1 and 6 (simulates a dice).
● Write a Python program to implement a stack using list.
● Create a CSV file by entering user-id and password, read and search the password for given userid.
Database Management
● Create a student table and insert data. Implement the following SQL commands on the student table:
o ALTER table to add new attributes / modify data type / drop attribute
o UPDATE table to modify data
o ORDER By to display data in ascending / descending order
o DELETE to remove tuple(s)
o GROUP BY and find the min, max, sum, count and average
● Similar exercise may be framed for other cases.
● Integrate SQL with Python by importing suitable module.
7. Suggested Reading Material
● NCERT Textbook for COMPUTER SCIENCE (Class XII)
● Support Materials on the CBSE website.
8. Project
The aim of the class project is to create something that is tangible and useful using Python file handling/ Python-SQL connectivity. This should be done in groups of two to three students and should be started by students at least 6 months before the submission deadline. The aim here is to find a real world problem that is worthwhile to solve.
Students are encouraged to visit local businesses and ask them about the problems that they are facing. For example, if a business is finding it hard to create invoices for filing GST claims, then students can do a project that takes the raw data (list of transactions), groups the transactions by category, accounts for the GST tax rates, and creates invoices in the appropriate format. Students can be extremely creative here. They can use a wide variety of Python libraries to create user friendly applications such as games, software for their school, software for their disabled fellow students, and mobile applications, of course to do some of these projects, some additional learning is required; this should be encouraged. Students should know how to teach themselves.
The students should be sensitized to avoid plagiarism and violations of copyright issues while working on projects. Teachers should take necessary measures for this.
*******RUonTop*******
Please do not write above given text it is only for reading.
CLASS XII – PROJECT FILE
SESSION 2026–27
Project Title:
STUDENT MANAGEMENT SYSTEM
Submitted By:
Name: ______________________________
Class: XII
Section: __________
Roll No.: __________
Submitted To:
Computer Science Teacher: ______________________________
School Name:
PAGE 1 – CERTIFICATE
CERTIFICATE
This is to certify that ____________________________, student of Class XII, Session 2026–27, has successfully completed the Computer Science project titled:
“STUDENT MANAGEMENT SYSTEM”
The project has been developed using Python and MySQL under my guidance.
This project is submitted as part of the practical work for CBSE Computer Science (083).
Teacher's Signature: __________________
External Examiner: ___________________
Date: __________________
School Seal
PAGE 2 – ACKNOWLEDGEMENT
ACKNOWLEDGEMENT
I would like to express my sincere thanks to my Computer Science teacher for providing guidance and support during this project.
I am also thankful to my school for providing the necessary facilities to complete this project.
Finally, I thank my parents and friends for their valuable support and encouragement.
Name: __________________
Class: XII
Roll No.: _______________
PAGE 3 – INDEX
| S.No. | Topic | Page |
|---|---|---|
| 1 | Certificate | 1 |
| 2 | Acknowledgement | 2 |
| 3 | Introduction | 4 |
| 4 | Objectives | 5 |
| 5 | Problem Definition | 6 |
| 6 | Hardware & Software Requirements | 7 |
| 7 | Technologies Used | 8 |
| 8 | System Design | 9 |
| 9 | Database Design | 10 |
| 10 | SQL Commands | 11 |
| 11 | Python Program | 12–15 |
| 12 | Sample Output | 16 |
| 13 | Test Cases | 17 |
| 14 | Advantages | 18 |
| 15 | Limitations | 19 |
| 16 | Future Scope | 20 |
| 17 | Conclusion | 21 |
| 18 | Bibliography | 22 |
| 19 | Viva Questions | 23 |
PAGE 4 – INTRODUCTION
INTRODUCTION
A Student Management System is a computer-based application used to store and manage student information.
The system stores information such as:
Roll Number
Student Name
Class
Section
Marks
City
Phone Number
The project is developed using Python for programming and MySQL for database management.
The application provides options to:
Add student
Display students
Search student
Update student
Delete student
Display topper
Exit
PAGE 5 – OBJECTIVES
OBJECTIVES OF THE PROJECT
The main objectives are:
To store student information systematically.
To reduce manual record keeping.
To search student records quickly.
To update student information easily.
To delete unwanted records.
To display student marks.
To identify the student having the highest marks.
To understand Python–MySQL connectivity.
To apply SQL commands in a real application.
To develop a simple menu-driven application.
PAGE 6 – PROBLEM DEFINITION
PROBLEM DEFINITION
Managing student records manually can be time-consuming.
It may be difficult to:
Find a particular student's record.
Update student information.
Delete old records.
Maintain large numbers of records.
Calculate and compare marks.
Therefore, a computerized Student Management System is developed to make record management easier, faster and more organised.
PAGE 7 – HARDWARE AND SOFTWARE REQUIREMENTS
HARDWARE REQUIREMENTS
Computer/Laptop
Minimum 4 GB RAM
Keyboard
Mouse
Hard Disk/SSD
Monitor
SOFTWARE REQUIREMENTS
Windows/Linux
Python 3.x
MySQL Server
MySQL Connector/Python
Python IDLE / VS Code / PyCharm
PAGE 8 – TECHNOLOGIES USED
TECHNOLOGIES
1. Python
Python is used to develop the application logic and menu-driven program.
2. MySQL
MySQL is used to store student records in a database.
3. MySQL Connector
mysql.connector provides connectivity between Python and MySQL.
Important functions used
| Function | Purpose |
|---|---|
| connect() | Connect Python with MySQL |
| cursor() | Create database cursor |
| execute() | Execute SQL query |
| commit() | Save changes |
| fetchone() | Fetch one record |
| fetchall() | Fetch multiple records |
| close() | Close connection |
PAGE 9 – SYSTEM DESIGN
FLOWCHART
START
|
v
Connect to MySQL
|
v
Display Menu
|
+--------+--------+
| | |
Add Display Search
| | |
+--------+--------+
|
Update/Delete
|
v
Display Topper
|
v
EXIT?
/ \
NO YES
| |
+--> MENU v
CLOSE DB
|
v
END
PAGE 10 – DATABASE DESIGN
DATABASE NAME
school_management
TABLE NAME
student
TABLE STRUCTURE
| Field | Data Type | Key |
|---|---|---|
| RollNo | INT | Primary Key |
| Name | VARCHAR(40) | Not Null |
| Class | VARCHAR(10) | — |
| Section | CHAR(1) | — |
| Marks | FLOAT | — |
| City | VARCHAR(30) | — |
| Phone | VARCHAR(15) | — |
Primary Key
RollNo is used as the primary key because every student has a unique roll number.
PAGE 11 – SQL COMMANDS
CREATE DATABASE
CREATE DATABASE school_management;
USE DATABASE
USE school_management;
CREATE TABLE
CREATE TABLE student
(
RollNo INT PRIMARY KEY,
Name VARCHAR(40) NOT NULL,
Class VARCHAR(10),
Section CHAR(1),
Marks FLOAT,
City VARCHAR(30),
Phone VARCHAR(15)
);
INSERT RECORD
INSERT INTO student
VALUES
(101,'Rahul','XII','A',87,'Lucknow','9876543210');
DISPLAY RECORDS
SELECT * FROM student;
UPDATE RECORD
UPDATE student
SET Marks=92
WHERE RollNo=101;
DELETE RECORD
DELETE FROM student
WHERE RollNo=101;
PAGE 12 – PYTHON PROGRAM
IMPORT MODULE
import mysql.connector
DATABASE CONNECTION
con = mysql.connector.connect(
host="localhost",
user="root",
password="",
database="school_management"
)
cur = con.cursor()
PAGE 13 – ADD AND DISPLAY FUNCTIONS
def add_student():
roll = int(input("Enter Roll No: "))
name = input("Enter Name: ")
cls = input("Enter Class: ")
section = input("Enter Section: ")
marks = float(input("Enter Marks: "))
city = input("Enter City: ")
phone = input("Enter Phone: ")
sql = """INSERT INTO student
VALUES (%s,%s,%s,%s,%s,%s,%s)"""
data = (roll, name, cls, section,
marks, city, phone)
cur.execute(sql, data)
con.commit()
print("Student added successfully.")
def display_students():
cur.execute("SELECT * FROM student")
records = cur.fetchall()
for row in records:
print(row)
PAGE 14 – SEARCH AND UPDATE
def search_student():
roll = int(input("Enter Roll No: "))
cur.execute(
"SELECT * FROM student WHERE RollNo=%s",
(roll,)
)
row = cur.fetchone()
if row:
print(row)
else:
print("Student not found.")
def update_student():
roll = int(input("Enter Roll No: "))
marks = float(input("Enter New Marks: "))
cur.execute(
"UPDATE student SET Marks=%s WHERE RollNo=%s",
(marks, roll)
)
con.commit()
print("Record updated successfully.")
PAGE 15 – DELETE, TOPPER AND MAIN MENU
def delete_student():
roll = int(input("Enter Roll No: "))
cur.execute(
"DELETE FROM student WHERE RollNo=%s",
(roll,)
)
con.commit()
print("Record deleted successfully.")
def topper():
cur.execute(
"SELECT * FROM student ORDER BY Marks DESC LIMIT 1"
)
row = cur.fetchone()
if row:
print("Topper:", row)
else:
print("No records available.")
while True:
print("\n===== STUDENT MANAGEMENT SYSTEM =====")
print("1. Add Student")
print("2. Display Students")
print("3. Search Student")
print("4. Update Marks")
print("5. Delete Student")
print("6. Display Topper")
print("7. Exit")
choice = int(input("Enter Choice: "))
if choice == 1:
add_student()
elif choice == 2:
display_students()
elif choice == 3:
search_student()
elif choice == 4:
update_student()
elif choice == 5:
delete_student()
elif choice == 6:
topper()
elif choice == 7:
print("Thank you!")
break
else:
print("Invalid choice.")
cur.close()
con.close()
PAGE 16 – SAMPLE OUTPUT
MAIN MENU
===== STUDENT MANAGEMENT SYSTEM =====
1. Add Student
2. Display Students
3. Search Student
4. Update Marks
5. Delete Student
6. Display Topper
7. Exit
Enter Choice: 1
ADD STUDENT
Enter Roll No: 101
Enter Name: Rahul
Enter Class: XII
Enter Section: A
Enter Marks: 87
Enter City: Lucknow
Enter Phone: 9876543210
Student added successfully.
DISPLAY
(101, 'Rahul', 'XII', 'A', 87.0, 'Lucknow', '9876543210')
SEARCH
Enter Roll No: 101
(101, 'Rahul', 'XII', 'A', 87.0, 'Lucknow', '9876543210')
PAGE 17 – TEST CASES
TESTING
| Test | Input | Expected Result |
|---|---|---|
| 1 | Add student | Record added |
| 2 | Display | All records displayed |
| 3 | Search existing roll | Student displayed |
| 4 | Search wrong roll | Student not found |
| 5 | Update marks | Marks updated |
| 6 | Delete record | Record deleted |
| 7 | Topper | Highest marks displayed |
| 8 | Exit | Program terminated |
Testing confirms that the major functions of the application work correctly.
PAGE 18 – ADVANTAGES
ADVANTAGES
Easy to use.
Saves time.
Reduces paperwork.
Fast searching.
Easy updating.
Easy deletion of records.
Data is stored systematically.
Reduces chances of manual errors.
Can handle multiple student records.
Database can be extended in future.
PAGE 19 – LIMITATIONS
LIMITATIONS
The system is designed for a local computer.
It requires MySQL installation.
It does not have a graphical user interface.
It does not provide online access.
User authentication is not included.
Backup facilities are not included.
PAGE 20 – FUTURE SCOPE
FUTURE SCOPE
The project can be improved by adding:
Graphical User Interface (GUI)
Login system
Student attendance
Fee management
Subject-wise marks
Report card generation
PDF reports
Excel/CSV export
Automatic backup
School-wise database
Web-based access
Cloud database
PAGE 21 – CONCLUSION
CONCLUSION
The Student Management System successfully demonstrates the use of Python and MySQL for managing student records.
The project helped in understanding:
Python programming
Functions
Conditional statements
Loops
SQL commands
Database tables
Primary keys
Python–MySQL connectivity
CRUD operations
The project is simple, useful and can be expanded into a complete school management application.
PAGE 22 – BIBLIOGRAPHY
BIBLIOGRAPHY
CBSE Computer Science (083) Curriculum 2026–27.
NCERT Computer Science textbook.
Python Documentation.
MySQL Documentation.
Class notes and practical exercises.
Teacher's guidance.
The CBSE 2026–27 curriculum specifically includes Python–SQL connectivity concepts such as connect(), cursor(), execute(), commit(), fetchone(), fetchall() and rowcount.
PAGE 23 – VIVA QUESTIONS AND ANSWERS
1. What is Python?
Python is a high-level, interpreted programming language.
2. What is MySQL?
MySQL is a relational database management system.
3. What is a database?
A database is an organised collection of data.
4. What is a table?
A table stores data in rows and columns.
5. What is a primary key?
A primary key uniquely identifies each record in a table.
6. What is SQL?
SQL stands for Structured Query Language.
7. What is CRUD?
CRUD means:
Create
Read
Update
Delete
8. What is connect()?
It establishes a connection between Python and MySQL.
9. What is cursor()?
It creates a cursor used to execute SQL commands.
10. What is execute()?
It executes an SQL query.
11. Why is commit() used?
commit() saves changes made to the database.
12. What does fetchone() do?
It retrieves one record from the result.
13. What does fetchall() do?
It retrieves all available records.
14. Why is %s used?
It is used as a parameter placeholder in parameterised SQL queries.
15. What is the purpose of this project?
The project is used to efficiently store, search, update and delete student records.
FINAL PROJECT CHECKLIST
Before submitting the project, check:
☐ Cover page completed
☐ Certificate signed
☐ Acknowledgement written
☐ Index completed
☐ Database created
☐ Table created
☐ Python program tested
☐ Output screenshots pasted
☐ Test cases completed
☐ Conclusion written
☐ Bibliography written
☐ Viva questions revised
☐ Teacher's signature obtained
PROJECT TITLE
STUDENT MANAGEMENT SYSTEM USING PYTHON AND MYSQL
Session: 2026–27
CBSE Computer Science – Code 083
RUonTop: Hi Welcome to our Blog...