______________ _______________
Internal Examiner External Examiner
ACKNOWLEDGEMENT:
Apart from the efforts of me, the success of any project depends
largely on the encouragement and guidelines of many others. I
take this opportunity to express my gratitude to the people who
have been instrumental in the successful completion of this
project. I express deep sense of gratitude to almighty God for
giving me strength for the successful completion on of the
project. I express my heartfelt gratitude to my parents for
constant encouragement while carrying out this project. I
gratefully acknowledge the contributed on of the individuals
who contributed in bringing this project up to this level, who
continues to look after me despite my flaws, I express my deep
sense of gratitude to the luminary The Principal, Guru Nanak
Public School (MRS. Neeta Pandey) who has been continuously
motivating and extending their helping hand to us. I express my
sincere thanks to the academician The vice Principal, Guru Nanak
Public School (Mr. Sudhir Kumar Gupta), for constant
encouragement and the guidance provided during school. My
sincere thanks to MR. Nizam, Master In-charge, A guide, Mentor
all the above a friend, who critically reviewed my project and
helped in solving each and every problem, occurred during
implementation of the project. The guidance and support
received from all the members who contributed and who are
contributing to this project, was vital for the success of the
project. I am grateful for their constant support and help.
INDEx:
1 Certificate 2
2 Acknowledgement 3
3 Introduction to project 5
7 Proposed system 7
11 Conclusion 30
13 Bibliography 32
STUDENTS MANAGEMENT SYSTEM
INTRODUCTION:
Student Management System project is written in Python
language and SQL is used for database connection. This is a
simple console-based system which is very easy to understand
and use. Talking about the system, it contains all the basic
functions which include insert new student details, view
student’s details that already exists, update or we can modify
student details also deletion function is there to delete the
student details that no more exist. It is too easy to use; he/she
can check the total student records easily. This project is
multifield project, so that it can be modified for various
purposes. The main object of this system is to provide a secure
system.
OBJECTIVES OF THE PROJECT:
The objective of this project is to
Let the students apply the programming knowledge into a
real- world situation/problem and exposed the students how
programming skills helps in developing a good software.
Write programs utilizing modern software tools.
Apply object-oriented programming principles effectively
when developing small to medium sized projects.
Implementing strong security measure to protect sensitive
financial data.
SCOPE OF THE PROJECT
User friendly interface
Fast access to database
Less error
More Storage Capacity Search facility
Look and Feel Environment
ExISTING SYSTEM:
In the current system we need to keep a number of records
related to the student and want to enter the details of the
student and the marks manually. In this system only the
teacher or the school authority views the mark of the student
and they want to enter the details of the student. This is time
consuming and has much cost.
PROPOSED SYSTEM:
Aim of this system is used to control and coordinate a
student’s data, information, their, name, admission number,
add new student or delete a student’s information. One has to
use the data management software. Software has been an
ascent in atomization various organizations. Many software
products working is now in markets, which have helped in
making the organizations work easier and efficiently. Data
management initially had to maintain a lot of ledgers and a lot
of paper work has to be done but now software product on
this organization has made their work faster and easier. Now
only this software has to be loaded on the computer and work
can be done.
This prevents a lot of time and money. The work becomes
fully automated and any information regarding the
organization can be obtained by clicking the button. Moreover,
now it’s an age of computers of and automating such an
organization gives the better look. Admin will have the full
authority to add features and disable it as per their
requirements.
WHAT IS PYTHON
Python is an interpreted high-level general-purpose
programming language. Its design philosophy emphasizes
code readability with its use of significant indentation. Its
language constructs as well as its object-oriented approach
aim to help programmers write clear, logical code for small
and large-scale projects.
Python is dynamically-typed and garbage-collected. It
supports multiple programming paradigms, including
structured (particularly, procedural), object-oriented and
functional programming. It is often described as a "batteries
included" language due to its comprehensive standard library.
FEATURES IN PYTHON
There are many features in Python, some of which are
discussed below
1. Easy to code:
Python is a high-level programming language. Python is very
easy to learn the language as compared to other languages
like C, C#, JavaScript, Java, etc. It is very easy to code in python
language and anybody can learn python basics in a few hours
or days. It is also a developer-friendly language.
2. Free and Open Source:
Python language is freely available at the official website and
you can download it easily. Since it is open-source, this means
that source code is also available to the public. So, you can
download it as, use it as well as share it.
3. Object-Oriented Language:
One of the key features of python is Object-Oriented
programming. Python supports object-oriented language and
concepts of classes, objects encapsulation, etc.
4. GUI Programming Support:
Graphical User interfaces can be made using a module such as
PyQt5, PyQt4, python, or Tk in python. PyQt5 is the most
popular option for creating graphical apps with Python.
5. High-Level Language:
Python is a high-level language. When we write programs in
python, we do not need to remember the system architecture,
nor do we need to manage the memory.
6. Extensible feature:
Python is an Extensible language. We can write us some
Python code into C or C++ language and also, we can compile
that code in C/C++ language.
7. Python is Portable language:
Python language is also a portable language. For example, if
we have python code for windows and if we want to run this
code on other platforms such as Linux, Unix, and Mac then we
do not need to change it, we can run this code on any platform.
8. Python is Integrated language:
Python is also an integrated language because we can easily
integrated python with other languages like C, C++, etc.
9. Interpreted Language:
Python is an Interpreted Language because Python code is
executed line by line at a time. like other languages C, C++,
Java, etc. there is no need to compile python code this makes
it easier to debug our code. The source code of python is
converted into an immediate form called bytecode.
10. Large Standard Library:
Python has a large standard library which provides a rich set
of module and functions so you do not have to write your own
code for every single thing. There are many libraries present
in python for such as regular expressions, unit-testing, web
browsers, etc.
11. Dynamically Typed Language:
Python is a dynamically-typed language. That means the type
(for example- int, double, long, etc.) for a variable is decided
at run time not in advance because of this feature we don’t
need to specify the type of variable.
STRUCTURED QUERY LANGUAGE (SQL)
WHAT IS SQL
SQL stands for Structured Query Language. It is used for
storing and managing data in relational database
management system (RDMS). It is a standard language for
Relational Database System. SQL is used to communicate with
a database. According to ANSI (American National Standards
Institute), it is the standard language for relational database
management systems. SQL statements are used to perform
tasks such as update data on a database, or retrieve data from
a database. Some common relational database management
systems that use SQL are: Oracle, Sybase, Microsoft SQL
Server, Access, Ingres, etc. However, the standard SQL
commands such as "Select", "Insert", "Update", "Delete",
"Create", and "Drop" can be used to accomplish almost
everything that one needs to do with a database. There are
the following advantages of SQL:
High speed. Using the SQL queries, the user can quickly and
efficiently retrieve a large number of records from a database.
No coding needed. ...
Well defined standards. ...
Portability. ...
Interactive language. ...
Multiple data view.
The features of SQL:
SQL is an ANSI and ISO standard computer language for
creating and manipulating databases.
SQL allows the user to create, update, delete, and retrieve
data from a database. SQL is very simple and easy to learn.
SQL works with database programs like DB2, Oracle, MS
Access, Sybase, MS SQL Server, etc.
SQL Queries can be used to retrieve large amounts of records
from a database quickly and efficiently.
import mysql.connector
import random
from tabulate import tabulate
from mysql.connector import Error
import os
def database():
random_value = random.randint(33, 100)
con=mysql.connector.connect(host="localhost",user="r
oot",passwd="")
cur=con.cursor()
cur.execute("create database if not exists School")
con.commit()
cur.execute("use School")
cur.execute("create table if not exists
students_Data(stuId int primary key
auto_increment,studF_Name varchar(20), studL_Name
varchar(20),class int,sec varchar(4),marks float)")
con.commit()
cur.close()
con.close()
def Insert_Data():
try:
con = mysql.connector.connect(
host="localhost",
user="root",
passwd="",
database='School'
)
cur = con.cursor()
con.commit()
print("Record inserted successfully and serial numbers
reordered")
finally:
if 'con' in locals() and con.is_connected():
cur.close()
con.close()
def Show_Data():
try:
connection = mysql.connector.connect(
host='localhost',
user='root',
password='',
database='School'
)
if connection.is_connected():
print("Connected to MySQL database")
cursor = connection.cursor()
# Define headers
headers = ['ID', 'F_Name', 'L_Name', 'Class', 'Section',
'Marks']
# Print table using tabulate
print("\n" + tabulate(results,
headers=headers,
tablefmt='pretty',
stralign='left'))
def Search_Data():
try:
con=mysql.connector.connect(host="localhost",user="r
oot",passwd="",database='School')
cur=con.cursor()
a=input("Enter Student First Name:")
b=input("Enter Student Last Name:")
cur.execute("select * from students_Data where
studF_Name='{}' and studL_Name='{}'".format(a, b))
data=cur.fetchall()
headers = ['ID', 'F_Name', 'L_Name', 'Class', 'Section',
'Marks']
print("\n" + tabulate(data,
headers=headers,
tablefmt='pretty',
stralign='left'))
con.close()
except Exception as ex:
print(str(ex))
def Update_Data():
try:
con = mysql.connector.connect(host="localhost",
user="root", passwd="", db="School")
cur = con.cursor()
cur.execute("select * from students_Data")
orginal_data = cur.fetchall()
print("Original Data:")
print(tabulate(orginal_data, headers=["ID", "F_Name",
"L_Name", "Class", "Section", "Marks"], tablefmt="pretty",
stralign="left"))
print("\n" + tabulate(orginal_data, headers=["ID",
"F_Name", "L_Name", "Class", "Section", "Marks"],
tablefmt="pretty", stralign="left"))
con.autocommit = True
def selct_data():
print("Select the column to update:")
print("1. First Name")
print("2. Last Name")
print("3. Class")
print("4. Section")
print("5. Marks")
choice = int(input("Enter your choice: "))
if choice == 1:
column = "studF_Name"
elif choice == 2:
column = "studL_Name"
elif choice == 3:
column = "class"
elif choice == 4:
column = "section"
elif choice == 5:
column = "marks"
else:
print(" Invalid choice")
return column
column = selct_data()
new_value = input("Enter the new value: ")
stuId = input("Enter the student ID to update: ")
update_query = f"UPDATE students_Data SET {column}
= %s WHERE stuId = %s"
cur.execute(update_query, (new_value, stuId))
con.commit()
print("Data updated successfully")
cur.execute("SELECT * FROM students_Data")
updated_data= cur.fetchall()
print("Updated Data:")
print(tabulate(updated_data, headers=["ID",
"F_Name", "L_Name", "Class", "Section", "Marks"],
tablefmt="pretty", stralign="left"))
con.close()
except Exception as ex:
print(str(ex))
def Delete_Data():
try:
con = mysql.connector.connect(host="localhost",
user="root", passwd="", db="School")
cur = con.cursor()
cur.execute("SELECT * FROM students_Data")
data=cur.fetchall()
hearders = ['ID', 'F_Name', 'L_Name', 'Class', 'Section',
'Marks']
print("\n" + tabulate(data, headers=hearders,
tablefmt="pretty", stralign="left"))
con.autocommit = True
stuId = input("Enter the student ID to delete: ")
data_to_delete = cur.fetchone()
print("Data to delete:")
print(tabulate(data_to_delete, headers=hearders,
tablefmt="pretty", stralign="left"))
print(tabulate(data_to_delete, headers=["ID",
"F_Name", "L_Name", "Class", "Section", "Marks"],
tablefmt="pretty", stralign="left"))
con.autocommit = True
delete_query = "DELETE FROM students_Data WHERE
stuId = %s"
cur. execute(delete_query, (stuId,))
con.commit()
print("Data deleted successfully")
cur.execute("SELECT * FROM students_Data")
remaining_data = cur.fetchall()
print("Remaining Data:")
data1=cur.fetchall()
print("\n" + tabulate(remaining_data,
headers=hearders, tablefmt="pretty", stralign="left"))
print(tabulate(remaining_data, headers=["ID",
"F_Name", "L_Name", "Class", "Section", "Marks"],
tablefmt="pretty", stralign="left"))
con.close()
except Exception as ex:
print(str(ex))
database()
while True:
#os.system('cls')
print("1-----Insert Record")
print("2-----Show Record")
print("3-----Update Record")
print("4-----Search Record")
print("5-----Delete Record")
print("6-----Exit")
op=int(input("Enter your option:"))
if op==1:
Insert_Data()
elif op==2:
Show_Data()
elif op==3:
Update_Data()
elif op==5:
Delete_Data()
elif op==4:
Search_Data()
elif op==6:
break
else:
break
OUTPUT:
HARDWARE
1. Laptop
2. Mobile Phone
3. Computer
4. Pen Drive
SOFTWARE
1. MySQL
2. Visual Studio Coder
3. Python Language
BIBLOGRAPHY
BOOKS
Sumita Arora-Computer Science with Python
WEBSITES
• https://www.wikipedia.org/
• https://www.youtube.com/
• Class 12 Project Railway Reservation | PDF | Python
(Programming Language) | Computer Programming
(scribd.com)