C12_ProjectFile

 

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.TopicPage
1Certificate1
2Acknowledgement2
3Introduction4
4Objectives5
5Problem Definition6
6Hardware & Software Requirements7
7Technologies Used8
8System Design9
9Database Design10
10SQL Commands11
11Python Program12–15
12Sample Output16
13Test Cases17
14Advantages18
15Limitations19
16Future Scope20
17Conclusion21
18Bibliography22
19Viva Questions23

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:

  1. Add student

  2. Display students

  3. Search student

  4. Update student

  5. Delete student

  6. Display topper

  7. Exit


PAGE 5 – OBJECTIVES

OBJECTIVES OF THE PROJECT

The main objectives are:

  1. To store student information systematically.

  2. To reduce manual record keeping.

  3. To search student records quickly.

  4. To update student information easily.

  5. To delete unwanted records.

  6. To display student marks.

  7. To identify the student having the highest marks.

  8. To understand Python–MySQL connectivity.

  9. To apply SQL commands in a real application.

  10. 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

FunctionPurpose
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

FieldData TypeKey
RollNoINTPrimary Key
NameVARCHAR(40)Not Null
ClassVARCHAR(10)—
SectionCHAR(1)—
MarksFLOAT—
CityVARCHAR(30)—
PhoneVARCHAR(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

TestInputExpected Result
1Add studentRecord added
2DisplayAll records displayed
3Search existing rollStudent displayed
4Search wrong rollStudent not found
5Update marksMarks updated
6Delete recordRecord deleted
7TopperHighest marks displayed
8ExitProgram terminated

Testing confirms that the major functions of the application work correctly.


PAGE 18 – ADVANTAGES

ADVANTAGES

  1. Easy to use.

  2. Saves time.

  3. Reduces paperwork.

  4. Fast searching.

  5. Easy updating.

  6. Easy deletion of records.

  7. Data is stored systematically.

  8. Reduces chances of manual errors.

  9. Can handle multiple student records.

  10. Database can be extended in future.


PAGE 19 – LIMITATIONS

LIMITATIONS

  1. The system is designed for a local computer.

  2. It requires MySQL installation.

  3. It does not have a graphical user interface.

  4. It does not provide online access.

  5. User authentication is not included.

  6. 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

  1. CBSE Computer Science (083) Curriculum 2026–27.

  2. NCERT Computer Science textbook.

  3. Python Documentation.

  4. MySQL Documentation.

  5. Class notes and practical exercises.

  6. 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

एक टिप्पणी भेजें

0 टिप्पणियाँ
* Please Don't Spam Here. All the Comments are Reviewed by Admin.