Computer Class 12 Project Final

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Certificate

To whom it may concern

This is to certify that Pritam Kumar Mandal of class XII


bearing roll no. has successfully
completed the project entitled “comparatively study of
the rate of fermentation” for the partial fulfillment of
AISSCE CHEMISTRY PRACTICAL EXAMINATION 2024
conducted by CBSE, Delhi under my thorough
supervision and careful guidance. It is further certified
that this project is the individual work of the candidate.

Prinipal’s signature:

Subject teacher:

Examiner:
Source Code

import mysql.connector

# Establishing a connection to MySQL


conn = mysql.connector.connect(
host="your_host",
user="your_username",
password="your_password",
database="your_database"
)

# Creating a cursor
cursor = conn.cursor()

# Creating tables if they don't exist


cursor.execute(
CREATE TABLE IF NOT EXISTS students (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
age INT,
grade VARCHAR(10)
)
)

cursor.execute(
CREATE TABLE IF NOT EXISTS teachers (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255),
subject VARCHAR(255)
)
)

def add_student(name, age, grade):


# Add a new student record to the database
cursor.execute("INSERT INTO students (name, age, grade)
VALUES (%s, %s, %s)", (name, age, grade))
conn.commit()
print("Student record added successfully!")

def add_teacher(name, subject):


# Add a new teacher record to the database
cursor.execute("INSERT INTO teachers (name, subject) VALUES
(%s, %s)", (name, subject))
conn.commit()
print("Teacher record added successfully!")

def delete_student(student_id):
# Delete a student record from the database
cursor.execute("DELETE FROM students WHERE id = %s",
(student_id,))
conn.commit()
print("Student record deleted successfully!")

def delete_teacher(teacher_id):
# Delete a teacher record from the database
cursor.execute("DELETE FROM teachers WHERE id = %s",
(teacher_id,))
conn.commit()
print("Teacher record deleted successfully!")

def edit_student(student_id, new_name, new_age, new_grade):


# Edit/Modify a student record in the database
cursor.execute("UPDATE students SET name=%s, age=%s, grade=
%s WHERE id=%s", (new_name, new_age, new_grade, student_id))
conn.commit()
print("Student record updated successfully!")
def edit_teacher(teacher_id, new_name, new_subject):
# Edit/Modify a teacher record in the database
cursor.execute("UPDATE teachers SET name=%s, subject=%s
WHERE id=%s", (new_name, new_subject, teacher_id))
conn.commit()
print("Teacher record updated successfully!")

def search_student(student_id):
# Search for a student record in the database
cursor.execute("SELECT * FROM students WHERE id = %s",
(student_id,))
result = cursor.fetchone()
if result:
print("Student record found:", result)
else:
print("Student record not found.")

def search_teacher(teacher_id):
# Search for a teacher record in the database
cursor.execute("SELECT * FROM teachers WHERE id = %s",
(teacher_id,))
result = cursor.fetchone()
if result:
print("Teacher record found:", result)
else:
print("Teacher record not found.")

def display_students():
# Display all student records in the database
cursor.execute("SELECT * FROM students")
results = cursor.fetchall()
if results:
for result in results:
print(result)
else:
print("No student records found.")

def display_teachers():
# Display all teacher records in the database
cursor.execute("SELECT * FROM teachers")
results = cursor.fetchall()
if results:
for result in results:
print(result)
else:
print("No teacher records found.")
Acknowledgments

The preparation of this project has been possible due to


various facilities offered by Kalyani Public School,
Barasat. I hereby extend my heartiest thanks to my
chemistry teachers of Kalyani Public School, Barasat
under whose overall guidance this project was
undertaken and accomplished successfully.

Date: Name:
Variables & Functions description of coding.

The provided Python script offers a School


Management System for both teachers and students,
utilizing Python with MySQL connectivity. The system
incorporates essential features for managing records,
including adding, deleting, editing, searching, updating,
and displaying records. Here's a synopsis of the project:

Database Connection:

The script establishes a connection to a MySQL


database, creating tables for both students and teachers
to store their respective information.

Functions for Students:

add_student(name, age, grade): Adds a new student


record to the "students" table in the database.
delete_student(student_id): Deletes a student record
based on the provided student ID.
edit_student(student_id, new_name, new_age,
new_grade): Modifies an existing student record in the
database.
search_student(student_id): Searches for a student
record based on the provided student ID.
display_students(): Retrieves and displays all student
records from the "students" table.
Functions for Teachers:

add_teacher(name, subject): Adds a new teacher record


to the "teachers" table in the database.
delete_teacher(teacher_id): Deletes a teacher record
based on the provided teacher ID.
edit_teacher(teacher_id, new_name, new_subject):
Modifies an existing teacher record in the database.
search_teacher(teacher_id): Searches for a teacher
record based on the provided teacher ID.
display_teachers(): Retrieves and displays all teacher
records from the "teachers" table.
.
Synopsis of the Project

The School Management System is a comprehensive


software solution developed using the Python
programming language with seamless connectivity to a
SQL/MySQL database. The system is designed to
streamline and automate various administrative and
academic processes within educational institutions,
enhancing efficiency and organization.

 Key Features:

User Authentication and Authorization:

The system provides secure login functionality for


administrators, teachers, students, and parents.
Different user roles have specific access levels to ensure
data confidentiality and integrity.
Student Information Management:
The system allows for the creation and management of
student profiles with details such as personal
information, contact details, and academic records.
Academic records include attendance, grades, and
examination results.

Teacher Information Management:

Teachers can be added, and their profiles include


personal information, contact details, and subjects
taught.
The system facilitates the assignment of classes and
subjects to teachers.

Class and Subject Management:


Administrators can create and manage class schedules,
assign teachers to specific classes, and allocate subjects
to each class.
The system ensures proper organization of academic
activities.

Attendance Tracking:

Teachers can mark and track student attendance for


each class.
The system generates attendance reports, helping
administrators and parents monitor student attendance
patterns.

Grading and Examination System:

The system supports the creation and management of


exams, including setting exam schedules, defining
grading criteria, and recording results.
Teachers can input grades, and the system calculates
overall academic performance.
Fee Management:

Administrators can manage fee structures, generate


invoices, and track fee payments.
Parents can view and pay fees through the system,
ensuring transparency and convenience.

Communication Module:

The system includes a communication platform for


announcements, notifications, and messaging between
administrators, teachers, and parents.
Reports and Analytics:

Comprehensive reporting tools provide insights into


various aspects of school operations, including student
performance, attendance, and financial status.

Database Connectivity:
The system uses SQL/MySQL for data storage,
ensuring robust and scalable database management.
Data is organized efficiently to support quick retrieval
and reporting.

User-Friendly Interface:

The system features an intuitive and user-friendly


interface, making it accessible to users with varying
technical proficiency.
Intput

add_student("John Doe", 15, "10th")


add_teacher("Mr. Smith", "Mathematics")
display_students()
display_teachers()
edit_student(1, "John Updated", 16, "11th")
edit_teacher(1, "Mr. Smith Updated", "Computer Science")
search_student(1)
search_teacher(1)
delete_student(2)
delete_teacher(1)
display_students()
display_teachers()
Output

Student record added successfully!


Teacher record added successfully!
(1, 'John Doe', 15, '10th')
(1, 'Mr. Smith', 'Mathematics')
Student record updated successfully!
Teacher record updated successfully!
Student record found: (1, 'John Updated', 16, '11th')
Teacher record found: (1, 'Mr. Smith Updated', 'Computer Science')
Student record deleted successfully!
Teacher record deleted successfully!
(1, 'John Updated', 16, '11th')
AISSCE PROJECT FILE

TOPIC: SCHOOL MANAGEMENT SYSTEM


NAME: PRITAM KUMAR MANDAL
SCHOOL: KALYANI PUBLIC SCHOOL
ROLL:
CLASS: 12(I)
SUBJECT: COMPUTER SCIENCE
YEAR: 2023-24

You might also like