0% found this document useful (0 votes)
223 views21 pages

Ip Class 12 Project Python and SQL

Uploaded by

mortyismydad
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
223 views21 pages

Ip Class 12 Project Python and SQL

Uploaded by

mortyismydad
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 21

Student Data

Management
System
Done by:
Zahabiya and
Anjana
Of class 12 B

1
INDEX
SNO. CONTENTS PAGE
NO.
1. Acknowledgement 3
2. Introduction 4
3. Database Design 5
4. Source code 6
5. Output Design 12
6. Conclusion 20
7. Bibliography 21

2
Acknowledgement
We would like to express our sincere gratitude to the our school
and their officials for providing us with the resources and the
opportunity to undertake this Information Practices project.
Their continuous support and encouragement have been
invaluable throughout the project.
We would also like to extend our heartfelt thanks to Ms.
Swapna Ma'am, our subject teacher, for her guidance, patience,
and insightful feedback. Her expertise and constant motivation
helped us stay on track and improve the quality of our work.
Without her support, this project would not have been as
successful as it is.
Lastly, we would like to express our deepest appreciation to our
parents for their unwavering support and encouragement. Their
belief in us and their constant understanding made it possible for
us to complete this project with dedication and enthusiasm.

3
Introduction
Student Data Management using
Python and MySQL

This project proposes the development of a Student Management


System (SMS) that utilizes Python and MySQL to create a centralized
platform for teachers to manage student data effectively. The system will
store essential details such as student names, class, division, marks, and
location, allowing teachers to access and update information seamlessly.

The SMS will feature a user-friendly interface developed in Python,


enabling teachers to easily input and manage student details. Each
student's profile will include vital information like name, class, division,
location, and marks in various subjects. By connecting to a MySQL
database, the system will ensure secure storage and quick retrieval of
data, making it easier for teachers to generate reports and track student
performance over time.

Moreover, the Student Management System will facilitate effective


communication between teachers, students, and parents by providing
features for notifications and updates. This connectivity ensures that
everyone involved in a student's education remains informed about
academic progress and important announcements. By leveraging the
power of Python and MySQL, this project aims to create a
comprehensive solution that not only simplifies administrative tasks .

4
Database Design
Csv Python and Mysql

CSV Table:

MYSQL Table:

5
SOURCE CODE
import pandas as pd
import matplotlib.pyplot as plt
import mysql.connector as sc
def read_csv_file():
df=pd.read_csv("C:\\Users\\OASISLAB\\Downloads\\adm.csv)
print(df)
def data_analysis_menu(): df=pd.read_csv("C:\\Users\\
OASISLAB\\Downloads\\adm.csv")
while True:
print('_'*98)
print('1. Show Columns')
print('2. Show Specific Column')
print('3. how Top Rows')
print('4. Row Bottom Rows')
print('5. Add a New Column')
print('6. Delete a Column')
print('7. Data Summery')
print('8. Exit (Move to main menu)')
ch = int(input('\n\nEnter your choice:')
if ch == 1:
print(df.columns)
wait = input('\n\n\n Press any key to continuee.....')
if ch == 2:
print(df.columns)
col_name = input('Enter Column Name that You want to
print : ')
print(df[col_name])
wait = input('\n\n\n Press any key to continuee.....')
if ch == 3:

6
n = int(input('Enter Total rows you want to show :'))
print(df.head(n))
wait = input('\n\n\n Press any key to continuee.....')
if ch == 4:
n = int(input('Enter Total rows you want to show :'))
print(df.tail(n))
wait = input('\n\n\n Press any key to continuee.....)
if ch == 5:
col_name = input('Enter new column name :')
col_value = int(input('Enter default column value :'))
df[col_name] = col_value
print(df)
print('\n\n\n Press any key to continue....')
wait = input()
if ch == 6:
col_name = input('Enter column Name to delete :')
del df[col_name]
print(df)
print('\n\n\n Press any key to continue....')
wait = input()
if ch == 7:
print(df.describe())
print("\n\n\nPress any key to continue....")
wait = input()
if ch == 8:
break

def graph():
df = pd.read_csv("C:\\Users\\OASISLAB\\Downloads\\
adm.csv")
while True:
print('\nGRAPH MENU ')
print('_'*100)
print('1. Marks Line Graph\n')
print('2. Marks Bar Graph\n')
7
print('3. Marks Horizontal Bar graph\n')
print('4. Exit (Move to main menu)')
ch = int(input('Enter your choice:'))

if ch == 1:
x = df['Name']
y = df['Marks']
plt.xlabel('Name of the Students')
plt.ylabel('Marks')
plt.title('Marks of Students')
plt.grid(True)
plt.plot(x,y)
plt.show()
if ch == 2:
x = df['Name']
y = df['Marks']
plt.xlabel('Name of the Students')
plt.ylabel('Marks')
plt.title('Marks of Students')
plt.bar(x, y)
plt.grid(True)
plt.show()
if ch == 3:
x = df['Name']
y = df['Marks']
plt.xlabel('Name of the Students')
plt.ylabel('Marks')
plt.title('Marks of Students')
plt.barh(x,y)
plt.show()
if ch == 4:
break

def export_menu():
df = pd.read_csv('C:\\Users\\OASISLAB\\Downloads\\adm.csv')
8
while True:
print('\n\nEXPORT MENU ')
print('_'*100)
print()
print('1. CSV File\n')
print('2. Excel File\n')
print('3. Exit (Move to main menu)\n')
ch = int(input('Enter your Choice : '))
if ch == 1:
df.to_csv('C:\\Users\\OASISLAB\\Downloads\\adm2.csv')
print('\n\nCheck your new file "adm2.csv" on C: Drive.....')
wait = input('\n\n\n Press any key to continuee.....')
if ch == 2:
df.to_excel('C:\\Users\\OASISLAB\\Downloads\\
adm2.xlsx')
print('\n\nCheck your new file "adm2.xlsx" on C: Drive.....')
wait = input('\n\n\n Press any key to continuee.....')
if ch == 3:
break

def Marks_Display_SQL():
while True:
print('\n\nMarks Display from Database ')
print('_'*100)
print()
print('1. Add Details\n')
print('2. Search Details\n')
print('3. Remove Details\n')
print('4. Exit (Move to main menu)\n')
ch = int(input('Enter your Choice : '))
if ch == 1:
admno=int(input("Enter Admission No:"))
Name=input("Enter Student Name :")
HY=int(input("Enter Halfyearly marks:"))
FY=int(input("Enter Final year marks:"))
9
Grade=input("Enter Grade:")
conn=sc.connect(host="localhost",user="root",password="tiger",d
atabase="Results")
mycursor=conn.cursor()
query1="insert into Marks values({},'{}',{},
{},'{}')".format(admno,Name,HY,FY,Grade)
mycursor.execute(query1)
conn.commit()
conn.close()
wait = input('\n\n\n Press any key to continuee.....')
if ch == 2:
sname=input("Enter the Name of the Student you want to
search:")
print("\n")
conn=sc.connect(host="localhost",user="root",password="tiger",d
atabase="Results")
mycursor=conn.cursor()
query1="select * from Marks where
Name='{}'".format(sname)
mycursor.execute(query1)
myrecord=mycursor.fetchall()
for x in myrecord:
print(x)
conn.close()
wait = input('\n\n\n Press any key to continuee.....')
if ch == 3:
admno=int(input("Enter the Admission number of the
Student you want to remove:"))
conn=sc.connect(host="localhost",user="root",password="tiger",d
atabase="Results")
mycursor=conn.cursor()
query1="delete from Marks where
admno='{}'".format(admno)
mycursor.execute(query1)
10
conn.commit()
conn.close()
wait = input('\n\n\n Press any key to continuee.....')
if ch == 4:
break

while True:
print('MAIN MENU ')
print('_'*100)
print()
print('1. Show Whole Dataframe\n')
print('2. Data Analysis Menu\n')
print('3. Graph Menu\n')
print('4. Export Data\n')
print('5. Marks Display from Database\n')
print('6. Exit\n')
ch = int(input('Enter your choice :'))
if ch == 1:
read_csv_file()
wait = input('\n\n Press any key to continue....')
if ch == 2:
data_analysis_menu()
wait = input('\n\n Press any key to continue....')
if ch == 3:
graph()
wait = input('\n\n Press any key to continue....')
if ch == 4:
export_menu()
wait = input('\n\n Press any key to continue....')
if ch == 5:
Marks_Display_SQL()
wait = input('\n\n Press any key to continue....')
if ch == 6:
break

11
Output design
MAIN MENU

1. Show Whole Dataframe

2. Data Analysis Menu

3. Graph Menu

4. Export Data

5. Marks Display from Database

6. Exit

Enter your choice :2

1. Show Columns

2. Show Specific Column

3. how Top Rows

4. Row Bottom Rows

12
5. Add a New Column

6. Delete a Column

7. Data Summery

8. Exit (Move to main menu)

13
14
Enter your choice :3

GRAPH MENU

1. Marks Line Graph

2. Marks Bar Graph

3. Marks Horizontal Bar graph

4. Exit (Move to main menu)


Enter your choice:

*Enter your choice:1

*Enter your choice:2

15
*Enter your choice:3

16
Enter your choice :4

EXPORT MENU

1. CSV File

2. Excel File

3. Exit (Move to main menu)

Enter your Choice :

*Enter your Choice : 1

Check your new file "adm2.csv" on C: Drive.....

Press any key to continuee.....

*Enter your Choice : 2

Check your new file "adm2.xlsx" on C: Drive.....

Press any key to continuee.....

17
Enter your choice :5

Marks Display from Database

1. Add Details

2. Search Details

3. Remove Details

4. Exit (Move to main menu)

Enter your Choice :

*Enter your Choice : 1


Enter Admission No:21
Enter Student Name :Zara
Enter Halfyearly marks:86
Enter Final year marks:81
Enter Grade:B

18
*Enter your Choice : 2

Enter the Name of the Student you want to search:Anjana

(11, 'Anjana', 96, 92, 'A')

*Enter your Choice : 3

Enter the Admission number of the Student you want to remove:21

19
CONCLUSION

In summary, the organized management of student


data—serves as the backbone of an effective
Student Management System. By systematically
categorizing this information, institutions can
enhance communication, streamline administrative
processes, and ensure accurate tracking of student
performance. This structured approach not only aids
in efficient record-keeping but also facilitates
informed decision-making for educators and
administrators. As schools increasingly rely on data-
driven insights to support student learning and
development, maintaining a comprehensive and
easily accessible database becomes essential.
Ultimately, this leads to improved academic
outcomes and a more supportive educational
environment for all students.

20
BIBLIOGRAPHY

- Preeti Arora – Informatics Practices


- NCERT Informatics Practices Textbook class 12

- GeeksforGeeks. (n.d.). Introduction to MySQL.


[https://www.geeksforgeeks.org/mysql-tutorial/](https://www.geeksforgeeks.org/
mysql-tutorial/)

- Codecademy. (n.d.). Learn SQL


[https://www.codecademy.com/learn/learn-sql](https://www.codecademy.com/
learn/learn-sql)

- Learn Python
[https://www.geeksforgeeks.org/python-os-link-method/]

-Holoviz

https://panel.holoviz.org/how_to/links/links.html

21

You might also like