0% found this document useful (0 votes)
17 views

Cs Project

Uploaded by

mssaranmssaran1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Cs Project

Uploaded by

mssaranmssaran1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 39

ABSTRACT

The Student Management System Using Python and MySQL is a


comprehensive software application designed to automate the management of
student records within educational institutions. This system addresses the
growing need for a reliable, efficient, and secure method of handling student
data. Traditional paper-based methods or standalone applications often lead
to errors, inefficiencies, and security concerns, particularly as the number of
students increases. To combat these challenges, this project integrates Python
as the frontend for ease of use and flexibility, while MySQL serves as the
backend for robust data storage and management.

The system is designed to facilitate CRUD (Create, Read, Update, Delete)


operations, allowing administrators to add new student records, update
existing ones, delete obsolete data, and search for specific entries based on
various criteria. It features a secure login mechanism that ensures only
authorized users have access to sensitive student information. Furthermore,
the system supports multiple operations, including storing personal details,
academic records, and administrative information such as admission
numbers, year of passing, and parental details.

One of the core advantages of this system is its ability to streamline the
entire process of managing student records, thus reducing manual effort and
minimizing the risk of data entry errors. The MySQL database ensures that all
records are stored securely and can be retrieved quickly when needed, with
each transaction being committed to the database for data integrity. In

1
addition, the system has built-in safeguards for data security, ensuring that
unauthorized access is prevented.

This project has the potential to significantly improve administrative


efficiency by reducing the time spent on manual record-keeping, enhancing
accuracy, and providing real-time access to student data. In future iterations,
the system could be extended with features such as graphical user interfaces
(GUIs), remote database access, and reporting tools for better data analysis
and decision-making.

The Student Management System aims to be an effective solution for


educational institutions seeking to modernize their administrative processes,
thereby offering a scalable and secure method for managing student
information in the digital age.

2
INTRODUCTION

Managing student data efficiently is a critical requirement for


educational institutions, especially as they grow in size and complexity.
Traditionally, schools and colleges have relied on physical registers or simple
spreadsheets to track student information, such as personal details, academic
performance, and administrative records. However, these methods have
several shortcomings, including vulnerability to data loss, human error, time
inefficiency, and the difficulty of retrieving and updating records in real time.
As the number of students increases, these manual processes become even
more challenging to maintain and prone to inaccuracies.

In today’s digital age, where large volumes of data need to be handled


with precision and speed, educational institutions are turning towards
automated systems to manage their student records. These systems not only
ensure data accuracy but also provide enhanced security, better organization,
and easier access to information. Automating student data management
allows institutions to focus more on their core activities, like teaching and
learning, while reducing administrative burdens.

This project introduces a Student Management System that leverages


Python and MySQL to provide a streamlined solution for managing student
data. Python, with its simplicity and flexibility, serves as the programming
language for building the application’s logic and user interface, while MySQL
acts as the robust backend database for storing and managing data securely.
The system is designed to perform all necessary CRUD (Create, Read, Update,

3
Delete) operations, empowering the administrator to efficiently handle
student records without needing to rely on manual processes.

The system covers a wide range of functionalities, starting from student


admissions to tracking academic records, and personal and administrative
information. Administrators can insert new student data into the database,
update records as required, delete outdated or incorrect information, and
view all stored records with ease. Each transaction is securely stored in the
MySQL database, ensuring data integrity and reliability.

To maintain security and confidentiality, the system implements a login


mechanism, which ensures that only authorized personnel can access the
database and perform operations on the data. This prevents unauthorized
access and protects sensitive student information from misuse. The system is
user-friendly and scalable, making it suitable for educational institutions of
various sizes, from small schools to large universities.

By automating the management of student data, this project aims to


enhance operational efficiency, reduce the chances of errors, and provide an
accurate and secure means of handling large volumes of information. The
proposed system offers a reliable solution that addresses the common
challenges of traditional student record management, setting the stage for
more modern, digitized administrative processes in education.

4
EXISTING SYSTEM

Currently, many educational institutions rely on paper-based systems or


basic spreadsheet software for managing student records. These systems are
prone to human error, require significant manual effort, and are not scalable.
Furthermore, searching for specific records or generating reports can be time-
consuming. In the worst-case scenario, data can be lost due to physical
damage or unauthorized access, leading to major administrative challenges.

Challenges of the Existing System:

 Data retrieval is slow and inefficient.


 Lack of data security, as records are often accessible to unauthorized
personnel.
 Difficulty in maintaining large datasets and making updates.
 Error-prone manual data entry.
 Lack of backups for physical data storage.

5
PROPOSED SYSTEM

The proposed Student Management System addresses the challenges of


the existing system by providing an automated solution using Python and
MySQL. The system ensures efficient data management by allowing users to
perform CRUD (Create, Read, Update, Delete) operations. The user interface is
console-based, allowing administrators to interact with the system through a
series of menu options.

The system includes:

1. Database Creation and Table Management: The system initializes by


connecting to a MySQL database and creates the necessary database and
tables if they don't already exist.
2. Login Authentication: Secure login mechanisms ensure that only
authorized users can access the system.
3. CRUD Operations: Users can insert new student records, update
details, delete entries, and search for specific records.
4. Display All Records: A function to display all records in the system for
easy viewing and verification.
5. Efficient Data Handling: The system commits each operation to the
database, ensuring data integrity and persistence.

Advantages of the Proposed System:

 Faster data retrieval and efficient management of student records.


 Ease of data entry and editing with reduced risk of human error.
 Automatic backups and data integrity ensured by MySQL.

6
SYSTEM REQUIREMENTS

SOFTWARE:

- Python 3.x

- MySQL Server

- MySQL Connector for Python

- Integrated Development Environment (IDE) like PyCharm or VS Code

- Operating System: Windows, macOS, or Linux

HARDWARE:

- Processor: Dual-core 2 GHz or higher

- RAM: 4 GB or higher

- Hard Disk: 100 MB of free space

- Monitor: Standard resolution of 1366x768 or higher

7
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)

The systems development life cycle is a project management technique that


divides complex projects into smaller, more easily managed segments or
phases. Segmenting projects allows managers to verify the successful
completion of project phases before allocating resources to subsequent
phases.
Software development projects typically include initiation, planning,
design, development, testing, implementation, and maintenance phases.
However, the phases may be divided differently depending on the
organization involved.
For example, initial project activities might be designated as request,
requirements-definition, and planning phases, or initiation, concept-
development, and planning phases. End users of the system under

8
development should be involved in reviewing the output of each phase to
ensure the system is being built to deliver the needed functionality.

PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE

INITIATION PHASE

The Initiation Phase begins when a business sponsor identifies a need or an


opportunity.
The purpose of the Initiation Phase is to:
● Identify and validate an opportunity to improve business
accomplishments of the organization or a deficiency related to a
business need.
● Identify significant assumptions and constraints on solutions to that
need.
● Recommend the exploration of alternative concepts and methods to
satisfy the need including questioning the need for technology, i.e., will a
change in the business process offer a solution?
● Assure executive business and executive technical sponsorship. The
Sponsor designates a Project Manager and the business need is
documented in a Concept Proposal. The Concept Proposal includes
information about the business process and the relationship to the
Agency/Organization.

9
● Infrastructure and the Strategic Plan. A successful Concept Proposal
results in a Project Management Charter which outlines the authority of
the project manager to begin the project.

Careful oversight is required to ensure projects support strategic business


objectives and resources are effectively implemented into an organization's
enterprise architecture. The initiation phase begins when an opportunity to
add, improve, or correct a system is identified and formally requested through
the presentation of a business case. The business case should, at a minimum,
describe a proposal’s purpose, identify expected benefits, and explain how the
proposed system supports one of the organization’s business strategies. The
business case should also identify alternative solutions and detail as many
informational, functional, and network requirements as possible.

SYSTEM CONCEPT DEVELOPMENT PHASE:


The System Concept Development Phase begins after a business need or
opportunity is validated by the Agency/Organization Program Leadership and
the Agency/Organization CIO.

The purpose of the System Concept Development Phase is to:


● Determine the feasibility and appropriateness of the alternatives.
● Identify system interfaces.
● Identify basic functional and data requirements to satisfy the business
need.
● Establish system boundaries; identify goals, objectives, critical success
factors, and performance measures.

10
● Evaluate costs and benefits of alternative approaches to satisfy the basic
functional requirements
● Assess project risks
● Identify and initiate risk mitigation actions, and Develop high-level
technical architecture, process models, data models, and a concept of
operations. This phase explores potential technical solutions within the
context of the business need.
● It may include several trade-off decisions such as the decision to use
COTS software products as opposed to developing custom software or
reusing software components, or the decision to use an incremental
delivery versus a complete, onetime deployment.
● Construction of executable prototypes is encouraged to evaluate
technology to support the business process. The System Boundary
Document serves as an important reference document to support the
Information Technology Project Request (ITPR) process.
● The ITPR must be approved by the State CIO before the project can
move forward.

PICTORIAL REPRESENTATION OF SDLC:

11
PLANNING PHASE

The planning phase is the most critical step in completing development,


acquisition, and maintenance projects. Careful planning, particularly in the
early stages of a project, is necessary to coordinate activities and manage
project risks effectively. The depth and formality of project plans should be
commensurate with the characteristics and risks of a given project. Project
plans refine the information gathered during the initiation phase by further
identifying the specific activities and resources required to complete a project.
A critical part of a project manager’s job is to coordinate discussions
between user, audit, security, design, development, and network personnel to
identify and document as many functional, security, and network
requirements as possible. During this phase, a plan is developed that
documents the approach to be used and includes a discussion of methods,
tools, tasks, resources, project schedules, and user input. Personnel
assignments, costs, project schedule, and target dates are established.
A Project Management Plan is created with components related to
acquisition planning, configuration management planning, quality assurance
planning, concept of operations, system security, verification and validation,
and systems engineering management planning.

REQUIREMENTS ANALYSIS PHASE

This phase formally defines the detailed functional user requirements


using high-level requirements identified in the Initiation, System Concept, and
Planning phases. It also delineates the requirements in terms of data, system

12
performance, security, and maintainability requirements for the system. The
requirements are defined in this phase to a level of detail sufficient for
systems design to proceed. They need to be measurable, testable, and relate to
the business need or opportunity identified in the Initiation Phase. The
requirements that will be used to determine acceptance of the system are
captured in the Test and Evaluation Master Plan.
The purposes of this phase are to:
● Further define and refine the functional and data requirements and
document them in the Requirements Document,
● Complete business process reengineering of the functions to be
supported (i.e., verify what information drives the business process,
what information is generated, who generates it, where does the
information go, and who processes it),
● Develop detailed data and process models (system inputs, outputs, and
the process.
● Develop the test and evaluation requirements that will be used to
determine acceptable system performance.

DESIGN PHASE:
The design phase involves converting the informational, functional,
and network requirements identified during the initiation and planning
phases into unified design specifications that developers use to script
programs during the development phase. Program designs are constructed in
various ways. Using a top-down approach, designers first identify and link
major program components and interfaces, then expand design layouts as
they identify and link smaller subsystems and connections. Using a bottom-up

13
approach, designers first identify and link minor program components and
interfaces, then expand design layouts as they identify and link larger systems
and connections. Contemporary design techniques often use prototyping tools
that build mock-up designs of items such as application screens, database
layouts, and system architectures. End users, designers, developers, database
managers, and network administrators should review and refine the
prototyped designs in an iterative process until they agree on an acceptable
design. Audit, security, and quality assurance personnel should be involved in
the review and approval process. During this phase, the system is designed to
satisfy the functional requirements identified in the previous phase. Since
problems in the design phase could be very expensive to solve in the later
stage of the software development, a variety of elements are considered in the
design to mitigate risk. These include:
● Identifying potential risks and defining mitigating design features.
● Performing a security risk assessment.
● Developing a conversion plan to migrate current data to the new
system.
● Determining the operating environment.
● Defining major subsystems and their inputs and outputs.
● Allocating processes to resources.
● Preparing detailed logic specifications for each software module. The
result is a draft System Design Document which captures the
preliminary design for the system.
● Everything requiring user input or approval is documented and
reviewed by the user. Once these documents have been approved by the

14
Agency CIO and Business Sponsor, the final System Design Document is
created to serve as the Critical/Detailed Design for the system.
● This document receives a rigorous review by Agency technical and
functional representatives to ensure that it satisfies the business
requirements. Concurrent with the development of the system design,
the Agency Project Manager begins development of the Implementation
Plan, Operations and Maintenance Manual, and the Training Plan.

DEVELOPMENT PHASE
The development phase involves converting design specifications into
executable programs. Effective development standards include requirements
that programmers and other project participants discuss design specifications
before programming begins. The procedures help ensure programmers
clearly understand program designs and functional requirements.
Programmers use various techniques to develop computer programs. The
large transaction-oriented programs associated with financial institutions
have traditionally been developed using procedural programming techniques.
Procedural programming involves the line-by-line scripting of logical
instructions that are combined to form a program. Effective completion of the
previous stages is a key factor in the success of the Development phase. The
Development phase consists of:
● Translating the detailed requirements and design into system
components.
● Testing individual elements (units) for usability.
● Preparing for integration and testing of the IT system.

15
INTEGRATION AND TEST PHASE
● Subsystem integration, system, security, and user acceptance testing is
conducted during the integration and test phase. The user, with those
responsible for quality assurance, validates that the functional
requirements, as defined in the functional requirements document, are
satisfied by the developed or modified system. OIT Security staffs assess
the system security and issue a security certification and accreditation
prior to installation/implementation.
Multiple levels of testing are performed, including:
● Testing at the development facility by the contractor and possibly
supported by end users
● Testing as a deployed system with end users working together with
contract personnel
● Operational testing by the end user alone performing all functions.
Requirements are traced throughout testing; a final Independent
Verification & Validation evaluation is performed and all documentation
is reviewed and accepted prior to acceptance of the system.
IMPLEMENTATION PHASE:
This phase is initiated after the system has been tested and accepted by
the user. In this phase, the system is installed to support the intended
business functions. System performance is compared to performance
objectives established during the planning phase. Implementation includes
user notification, user training, installation of hardware, installation of
software onto production computers, and integration of the system into daily
work processes. This phase continues until the system is operating in
production in accordance with the defined user requirements.

16
OPERATIONS AND MAINTENANCE PHASE:
The system operation is ongoing. The system is monitored for continued
performance in accordance with user requirements and needed system
modifications are incorporated. Operations continue as long as the system can
be effectively adapted to respond to the organization’s needs. When
modifications or changes are identified, the system may reenter the planning
phase.
The purpose of this phase is to:
● Operate, maintain, and enhance the system.
● Certify that the system can process sensitive information.
● Conduct periodic assessments of the system to ensure the functional
requirements continue to be satisfied.
Determine when the system needs to be modernized, replaced, or retired.

17
CODING

import mysql.connector as mcon

import sys

con = mcon.connect(host="localhost",port="3306",user="root",passwd="root")

mycursor = con.cursor()

if con.is_connected():

print("MySql DataBase is connected Successfully.")

mycursor.execute("create database if not exists LOC")

mycursor.execute("use LOC")

mycursor.execute("create table if not exists user \

(uname varchar(20) primary key,upwd varchar(20)\

,utype char(5),ustatus char(5))")

Q = "insert into user(uname,upwd,utype) values (\'LOC\',\'LOC\',\'S\')"

#print(Q)

#mycursor.execute(Q)

con.commit()

18
at = 1

while at <= 3:

at += 1

uid = input("Enter User Name : ")

pwd = input("Enter User Password : ")

status = 'A'

mycursor.execute("select * from user where uname = '{}' and upwd = '{}' and
ustatus = '{}'".format(uid,pwd,status))

data = mycursor.fetchone()

count = mycursor.rowcount

#print(count)

if count == 1:

print("Login Successfully.")

print("Perform CRUD Operations.")

#--------------------------*CHOICES*-----------------------------

while True:

19
print("Input 'I' for Insertion a New Record.")

print("Input 'U' for Update an Existing Record.")

print("Input 'R' for Removal an Existing Record.")

print("Input 'S' for Searching a Record.")

print("Input 'D' for Display All Records.")

print("Input 'E' for Exit the Program.")

ch = input("Enter Your Option: ")

#--------------------------*TABLE CREATION*-----------------------------

if ch == 'I' or ch == 'i':

ins = "create table if not exists students(\

reg_num int(20) primary key, loc_sr_num integer NOT NULL, yr_pass_xi int(5)
NOT NULL,\

exam_cat char(5) NOT NULL,cand_name char(50) NOT NULL,mother_name


char(50) NOT NULL,\

father_name char(50) NOT NULL,gender varchar(5),category1


varchar(5),minority varchar(5),\

PwD_status varchar(20),mob_num bigint NOT NULL,email_id


varchar(50),aadhar_num bigint,\

20
sub_1 char(15),sub_2 char(15) NOT NULL,sub_3 char(15) NOT NULL,\

sub_4 char(15) NOT NULL,sub_5 char(15) NOT NULL,add_sub_6 char(15) NOT


NULL,\

int_grade_sub1 char(30),int_grade_sub2 char(30),int_grade_sub3


char(30),annual_income varchar(25),roll_num_of_equi_exam_passed integer,\

exam_of_equi_exam_passed char(20),board_of_equi_exam_passed
char(20),single_child char(5),\

migration_certificate char(5),adm_no integer,adm_date date)"

#print(ins)

mycursor.execute(ins)

#--------------------------*INSERTION OF RECORDS*-----------------------------

print("Insertion Operation.")

reg = int(input("Enter student's registration_num: "))

locsr = int(input("Enter student's loc_sr_num: "))

yrpassc11 = int(input("Enter student's year_passing_class11: "))

21
ecat = input("Enter student's exam_cat: ")

cname = input("Enter student's Name: ")

mname = input("Enter student's mother's name: ")

fname = input("Enter student's father's name: ")

gender = input("Enter student's gender: ")

cat = input("Enter student's category: ")

minor = input("Enter if student belongs to minority section(y/n): ")

pwdis = input("Enter if student have disability (type of disability): ")

mnum = int(input("Enter student's mobile_num: "))

email = input("Enter student's email_id: ")

ad_num = int(input("Enter student's addhar number: "))

s1 = input("Enter subject1(compulsory language): ")

s2 = input("Enter subject2: ")

s3 = input("Enter subject3: ")

s4 = input("Enter subject4: ")

s5 = input("Enter subject5: ")

s6 = input("Enter subject6(additional): ")

intsub1 = input("Enter name of internal grade subject1: ")

intsub2 = input("Enter name of internal grade subject2: ")

22
intsub3 = input("Enter name of internal grade subject3: ")

aninc = int(input("Enter annual income of student's parents: "))

eexrnum = int(input("Enter student's rollnum of equivalent exam


passed:"))

eexam = input("Enter student's exam of equivalent exam passed:")

eexboard = input("Enter student's board of equivalent exam passed:")

sch = input("Enter if student is single girl child or not:")

mgcr = input("Enter if migration certificate is required or not:")

adm_num = int(input("Enter student's admission num:"))

adm_date = input("Enter student's admission date as (yyyy-mm-dd):")

q = "insert into students


(reg_num,loc_sr_num,yr_pass_xi,exam_cat,cand_name,\

mother_name,father_name,gender,category1,minority,PwD_status,mob_num,emai
l_id,\

aadhar_num,sub_1,sub_2,sub_3,sub_4,sub_5,add_sub_6,int_grade_sub1,int_grade_s
ub2,int_grade_sub3,\

annual_income,roll_num_of_equi_exam_passed,exam_of_equi_exam_passed,board_
of_equi_exam_passed,\

single_child,migration_certificate,adm_no,adm_date) values ({},{},{},'{}',\

23
'{}','{}','{}','{}','{}','{}','{}',{},'{}',{},'{}','{}','{}','{}','{}','{}','{}','{}','{}',{},\

{},'{}','{}','{}','{}',{},'{}')\

".format(reg,locsr,yrpassc11,ecat,cname,mname,fname,gender,cat,minor,pwdis,m
num,email,ad_num,s1,s2,s3,s4,s5,s6,intsub1,intsub2,intsub3,aninc,eexrnum,eexam,
eexboard,sch,mgcr,adm_num,adm_date)

mycursor.execute(q)

con.commit()

print("Record is inserted Successfully.")

#--------------------------*UPDATION*-----------------------------

elif ch == 'U' or ch == 'u':

print("Updation of Record.")

reg = input("Enter Student's registration Number: ")

sn = input("Enter New student's Name: ")

mn = input("Enter New student Mother's Name: ")

fn = input("Enter New student Father's Name: ")

qry = "update students set cand_name = '{}' , mother_name = '{}' ,


father_name = '{}' where reg_num = {}".format(sn,mn,fn,reg)

24
mycursor.execute(qry)

con.commit()

print("Record is updated Successfully.")

#--------------------------*DELETION*-----------------------------

elif ch == 'R' or ch == 'r':

print("Removal of Record.")

reg = input("Enter Student's registration Number: ")

qry = "delete from students where reg_num = {}".format(reg)

mycursor.execute(qry)

con.commit()

print("Record is deleted Successfully.")

#--------------------------*SEARCHING*-----------------------------

elif ch == 'S' or ch == 's':

print("Searching Operation.")

reg = input("Enter Student's registration Number: ")

25
qry = "select * from students where reg_num = {} ".format(reg)

#print(qry)

mycursor.execute(qry)

print("Record is found Successfully.")

data = mycursor.fetchone()

count = mycursor.rowcount

print("Total No. of Record:",count)

for row in data:

print(row)

#--------------------------*DISPLAY*-----------------------------

elif ch == 'D' or ch == 'd':

print("Display ALl Records.")

qry = "select * from students"

mycursor.execute(qry)

data = mycursor.fetchall()

count = mycursor.rowcount

print("Total No. of Record: ",count)

26
print("{0:<9s}{1:<9s}{2:<9s}{3:<9s}{4:<9s}{5:<9s}{6:<9s}{7:<9s}{8:<9s}
{9:<9s}".format('Sl.No','Name','MName','FName','Subject1','Subject2','Subject3','Sub
ject4','Subject5','Subject6'))

print("_____________________________________________________________________________
____________")

for row in data:

print("{0:<9s}{1:<9s}{2:<9s}{3:<9s}{4:<9s}{5:<9s}{6:<9s}{7:<9s}
{8:<9s}
{9:<9s}".format(str(row[1]),row[4],row[5],row[6],row[14],row[15],row[16],row[1
7],row[18],row[19]))

elif ch == 'E' or ch == 'e':

print("Exiting Program.")

sys.exit(0)

else:

print("Wrong Input. Try Again!!!!!")

else:

print("Login Failed")

if at !=4:

print("Try Again")

27
else:

print("MySql DataBase Connection Failed.Terminating....")

28
1.Table created successfully.

29
STRUCTURE OF THE TABLE

30
2. Insertion of record:

31
3. Updating record:

32
4. Deleting a record:

5. Searching a record:

33
6. Display all Records:

34
35
7. Exit:

RECORDS:

36
CONCLUSION

37
The Student Management System Using Python and MySQL provides a
robust solution for managing student data in an educational institution. By
transitioning from a manual system to a digital database-driven solution, the
institution can ensure data accuracy, improve administrative efficiency, and
safeguard student records from unauthorized access or loss. Future
enhancements could include a graphical user interface (GUI), remote access
features, and more complex data analysis functionalities to further streamline
administrative tasks.

38
BIBLIOGRAPHY

1. MySQL Official Documentation: https://dev.mysql.com/doc/

2. Python MySQL Connector:


https://dev.mysql.com/doc/connector-python/en/

3. Python Programming for MySQL:


https://docs.python.org/3/library/mysql.html

39

You might also like