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

Student management system

.

Uploaded by

anakhd00
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)
50 views

Student management system

.

Uploaded by

anakhd00
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/ 41

ACKNOWLEDGEMENT

It is with pleasure that I acknowledge my sincere


gratitude to our teacher, Anju Ma’am who taught me
computer science and guided me during the
development of this project. I have greatly benefited
from her classes.

I am especially indebted to our Principal, Sr. Neetha


who has always been a source of encouragement
and support and without whose inspiration this
project would not have been successful. I would like
to place on record my heartfelt gratitude to her.

Joel John Thomas

1
STUDENT MANAGEMENT
SYSTEM

2
INDEX
S no Description Pg. no
1. INTRODUCTION 4
2. OBJECTIVE 5
3. SDLC 6
4. PROPOSED SYSTEM 8
5. ABOUT PYTHON 10
6. FEASIBILITY STUDY 14

7. DATABASE CREATION 15
8. CONNECTIVITY 17
9. PROGRAM CODE 18

10. OUTPUT SCREENS 26


11. ERRORS 35
12. TESTING 36
13. MAINTENANCE 38
14. REQUIREMENTS 39
15. LIMITATIONS 40
16. CONCLUSION 41
17. BIBLOGRAPHY 42

3
INTRODUCTION

This Project comprises of a Student Management


System developed using python programming
language. This is a simple console based system
that's very clean to recognize and uses a simple
console.

Talking about the system, it consists of basic


features which encompass inserting, updating,
viewing and deletion of the record of student. In this
mini undertaking, there may be no such login device.
This manner he/she can use all the ones available
functions without problems with none restriction.

4
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 expose the students how
programming skills helps in developing a good software.

1. Write programs utilizing modern software tools.


2. Apply object oriented programming principles
effectively when developing small to medium sized
projects.
3. Write effective procedural code to solve small to
medium sized problems.
4. Students will demonstrate a breadth of knowledge in
computer science, as exemplified in the areas of
systems, theory and software development.
5. Students will demonstrate ability to conduct a
research or applied Computer Science project,
requiring writing and presentation skills which
exemplify scholarly style in computer science.

5
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

6
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
development should be involved in reviewing the output
of each phase to ensure the system is being built to deliver
the needed functionality.

7
PROPOSED SYSTEM

Today one cannot afford to rely on the fallible human


beings of be really wants to stand against today's
merciless competition where not to wise saying "to err is
human" no longer valid, it's outdated to rationalize your
mistake. So, to keep pace with time, to bring about the best
result without malfunctioning and greater efficiency so to
replace the unending heaps of flies with a much
sophisticated hard disk of the computer.

One has to use the data management software. Software


has been an ascent in atomization various organizations.
Many software products working are 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 paperwork has to be
done but now software production 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.

8
This saves 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 and automating
such an organization gives the better look.

BENEFITS OF PROPOSED SYSTEM: -

1. Less Paper Work

2. No Manual Work

3. Register Maintenance is Easier

4. Data Is Not Scattered

5. User-friendly Software

6. Flexibility

7. Beneficial

9
ABOUT PYTHON

Python is a general-purpose, high-level programming


language developed by Guido van Rossum in 1990. Its
design philosophy emphasizes code readability with the
use of significant indentation. Python is dynamically
typed and garbage-collected. It is designed to be simple,
readable, and capable of handling complex problems with
ease. It supports multiple programming paradigms,
including structured (particularly procedural), object-
oriented and functional programming. Python consistently
ranks as one of the most popular programming languages.

Python is derived from many other languages, including


ABC, Modula-3, Unix shell, and other scripting languages.
Python comes with a comprehensive standard library that
provides modules and packages for tasks ranging from file
I/O to web development. This library reduces the need to
write code from scratch for common tasks. This also
minimizes the need for third-party libraries in many cases.

Python is meant to be an easily readable language. Its


formatting is visually uncluttered and often uses English
keywords where other languages use punctuation. Unlike
many other languages, it does not use curly brackets to
10
delimit blocks, and semicolons after statements are
allowed but rarely used.

Python uses whitespace indentation, rather than curly


brackets or keywords, to delimit blocks. An increase in
indentation comes after certain statements; a decrease in
indentation signifies the end of the current block. Thus,
the program's visual structure accurately represents its
semantic structure. This feature is sometimes termed
the off-side rule.

In Python, there are two working modes through which


you can execute Python programs: interactive mode and
script mode. The interactive mode of Python accepts a
single line of code and executes it immediately to provide
the result. This mode is useful for testing the code or
getting a quick result of a line of code.
In contrast, if you have a block of code in Python, you can
use the script mode. In this mode, you write a program in a
file (called a script) and save it with the .py extension. The
Python interpreter reads the file, executes it, and provides
the desired result.

Python can serve as a scripting language for web


applications. Python is the language of choice for many
data scientists and machine learning engineers due to its

11
rich ecosystem of libraries for data analysis and machine
learning. Python is often used for automating repetitive
tasks and scripting. It's commonly used for tasks like
system administration and data processing. Python is
commonly used in artificial intelligence projects and
machine learning projects with the help of libraries like
Tensor Flow, Keras, Pytorch, and scikit-learn. As a
scripting language with a modular architecture, simple
syntax, and rich text processing tools, Python is often used
for natural language processing. Python can also be used
for graphical user interface (GUI) by using libraries like
Tkinter.

Python can also be used to create games, with libraries


such as Pygame, which can make 2D games. Python has
been successfully embedded in many software products as
a scripting language. Python is used extensively in the
information security industry, including in exploit
development.

Python supports the concept of file handling. File handling


is required to work with files, either to write to a file or
read data from it. File handling in Python is a powerful and
versatile tool that can be used to perform a wide range of
operations.

12
Python File Handling

Python treats file differently as text or binary and this is


important. Each line of code includes a sequence of
characters and they form text file Each line of a file is
terminated with a special character, called the EOL or End
of Line characters like comma (,) or newline character. It
ends the current line and tells the interpreter a new one
has begun. Let's start with Reading and Writing files.
We use open() function in Python to open a file in read or
write mode. Open() will return a file object. To return a file
object we use open() function along with two arguments,
that accepts file name and the mode, whether to read or
write. So, the syntax being: open(filename, mode). There
are three kinds of mode, that Python provides and how
files can be opened:

r", for reading. "w", for writing. “a ", for appending. "r+ ",
for both reading and writing

One must keep in mind that the mode argument is not


mandatory. If not passed, then Python will assume it to be
"r" by default.

There are also various other functions that help to


manipulate the files and its contents. One can explore
various other functions in Python Docs
13
FEASIBILITY STUDY

During the course of completion of this project work, the


complete analysis of proposed system was done. In the
analysis task, a complete care about the feasibility of the
proposed system was taken. The following feasibility
analyses were carried out during the course of this project
work on call management system for customer care:

1. Economical feasibility
2. Technical feasibility
3. Operational feasibility

1.Economical Feasibility: -
used method for evaluating the effectiveness of a
candidate system. The proposed system is economically
feasible because the benefits and the savings that are
expected from a candidate system outweigh the cost
incurred. In this case we are getting the intangible benefits
in terms of low cost of maintenance of data, less
redundancy and getting the quick results.

14
2.Technical Feasibility: -
The existing Hardware and Software facilities support the
proposed system. Computer and storage media are
available and software can be developed.

3.Operational feasibility: -
As in the case of present system the entire work is being
done manually. So the data being scattered, information
retrieval becomes difficult and maintaining database is
also very tedious. In case of proposed system, entire work
will be done automatically. So the above details regarding
the feasibility study show that the design of the proposed
system is very effective.

15
DATABASE CREATION
1. Create a database in MySQL named ‘student’:
(‘create database if not exists student’)
2. Create a table named 'stud’ with the following fields
names and field types:
(id integer primary key, sname varchar (15), fee
float)')
Primary key: id is the unique identification number of
a student.

3. Insert records in the table stud


INSERT INTO stud (id, sname, fee) VALUES ({}, {}, {}).
format (ID, NAME, FEE)

16
SETTING THE CONNECTION BETWEEN
PYTHON AND DATABASE

The Python module mysql.connector has been used in this


project to establish the connection with the MySQL
database with Python.
Syntax:
import mysql.connector as driver

The syntax to establish connection by providing username


and password is as follows:

con=driver.connect(host=’localhost’,user=’root’,password=
0987,charset=’utf8’)
if con.is_connected():
print(“Successfully Connected”)

PYTHON PROGRAM CODE


17
#Project on Student Management System
import mysql.connector as driver
import sys
def menu():
loop='y'
while(loop=='y' or loop=='Y'):
print("……..Menu…….")
print("1. CREATE DATABASE")
print("2. SHOW DATABASES")
print("3. CREATE TABLE")
print("4. SHOW TABLES")
print("5. INSERT RECORD")
print("6. UPDATE RECORD")
print("7. DELETE RECORD")
print("8. SEARCH RECORD")
print("9. DISPLAY RECORD")
print()
print()
choice=int(input("Enter the choice (1-9) : "))
if choice==1:
create_database()
elif(choice==2):
show_databases()
elif(choice==3):
18
create_table()
elif(choice==4):
show_tables()
elif(choice==5):
insert_record()
elif(choice==6):
update_record()
elif(choice==7):
delete_record()
elif(choice==8):
search_record()
elif(choice==9):
display_record()
else:
print("wrong Choice..")
loop=input("Do you want to try again? press y to continue...")
else:
sys.exit()
def create_database():
con=driver.connect(host='localhost',
user='root',
password='0987'
)
if con.is_connected():
print("Successfully Connected")

19
cur=con.cursor()
cur.execute('create database if not exists student')
print()
print("Database Created")
con.close()
def show_databases():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8')
if con.is_connected():
print("Successfully Connected")
cur=con.cursor()
cur.execute('show databases')
for i in cur:
print(i)
con.close()
def create_table():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
if con.is_connected():
print("Successfully Connected")
cur=con.cursor()
cur.execute('create table if not exists stud(id integer primary
key,sname varchar(15),fee float)')
print()
print("Table created -> STUD")
20
cur.execute('Desc stud')
print("+------------|--------------|-----------+")
print("+Column Name |DataType(Size)|NUL |")
print("+------------|--------------|-----------+")
for i in cur:
print('|{0:12}|{1:12} |{2:10} |'.format(i[0],i[1],i[2]))
print("+------------|--------------|-----------+")
con.close()
def show_tables():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
if con.is_connected():
print("Successfully Connected")
cur=con.cursor()
cur.execute('show tables')
for i in cur:
print(i)
con.close()
def insert_record():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
if con.is_connected():
#print("Successfully Connected")
cur=con.cursor()

21
ID=int(input("ENTER STUDENT ID : "))
name=input("ENTER NAME OF STUDENT : ")
fee=float(input("ENTER STUDENT FEE : "))
query1="INSERT INTO stud(id,sname,fee) VALUES({},'{}',
{})".format(ID,name,fee)
cur.execute(query1)
con.commit()
print('record inserted')
con.close()
else:
print("Error : Not Connected")
def update_record():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
cur=con.cursor()
d=int(input("Enter Student Id for update record : "))
ID=int(input("ENTER NEW STUDENT ID : "))
name=input("ENTER NEW NAME OF STUDENT : ")
fee=float(input("ENTER NEW FEE FOR STUDENT : "))
query1="update stud set id=%s,sname='%s',fee=%s where id=
%s"%(ID,name,fee,d)
cur.execute(query1)
con.commit()
print("Record Updated")
con.close()

22
def delete_record():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
cur=con.cursor()
d=int(input("Enter Student ID for deleting record : "))
query1="delete from stud where id={0}".format(d)
cur.execute(query1)
con.commit()
print("Record Deleted")
con.close()
def search_record():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
cur=con.cursor()
print("Enter the choice According to You want to search record :
")
print("1. ACCORDING TO ID")
print("2. ACCORDING TO NAME")
print("3. ACCORDING TO FEE")
print()
choice=int(input("ENTER THE CHOICE (1-3): "))
if choice==1:
d=int(input("Enter Student ID which you want to search : "))
query1="select * from stud where id=%s"%(d)
elif choice==2:
23
name=input("Enter Student Name which you want to search : ")
query1="select * from stud where sname='%s'"%(name)
elif choice==3:
fee=float(input("Enter Student fee which you want to search : "))
query1="select * from stud where fee=%s"%(fee)
else:
print("Wrong Choice")
cur.execute(query1)
rec=cur.fetchall()
count=cur.rowcount
print("Total no. of records found : ",count)
for i in rec:
print(i)
print("Record Searched ")
con.close()
def display_record():

con=driver.connect(host='localhost',user='root',password='0987',ch
arset='utf8',database='student')
if con.is_connected():
#print("Successfully Connected")
cur=con.cursor()
cur.execute('select * from stud')
rec=cur.fetchall()
count=cur.rowcount
print("+-----------|------------|------------+")
24
print("+ Stud ID | Stud Name | FEE +")
print("+-----------|------------|------------+")
for i in rec:
print('|{0:^9} |{1:12}|{2:12}|'.format(i[0],i[1],i[2]))
print("+-----------|------------|------------+")
print("+ Total no.of records are : ",count," |")
print("+-------------------------------------+")
#for i in rec :
# print(i)
con.close()
else:
print("Error : Database connection is not success")
menu()

25
OUTPUT SCREENS

Screen 1
Display a message and connect to the student
database

Screen 2
Option 2 will display the list of available
databases

26
Screen 3

27
Option 3 will create a table STUD

Screen 4
Option 4 displays the table that has been
created.

28
Screen 5
Option 5 will insert a new student record

29
Screen 6

30
Option 6 will update an existing student record

Screen 7
Option 7 allows you to delete the record of the
student by taking student id

31
Screen 8
Option 8 will search for the record according to
student ID, NAME or FEE in the stud table and
display the record if there is a match

32
Option 8 will search for the record according to
student ID, NAME or FEE in the stud table and
display the record if there is a match

Screen 9/Report

33
Option 9 will display all the record saved in the
stud table

ERROR AND ITS TYPES

An error, sometime called "A BUG" is anything in the code


that prevents a program from compiling and running
correctly. There are broadly three types of errors as
follows:

34
1. Compile-time errors: Errors that occurs during
compilation of a program is called compile time error. It
has two types as follows:

a. Syntax error: It refers to formal rules governing the


construction of valid statements in a language.
b. Semantics error: It refers to the set of rules which give
the meaning of a statement.

2.Run time Errors: Errors that occur during the execution


of program are run time errors. These are harder to detect
errors. Some run-time error stop the execution of program
which is then called program "Crashed".

3. Logical Errors: Sometimes, even if you don't encounter


any error during compiling-time and runtime, your
program does not provide the correct result. This is
because of the programmer's mistaken analysis of the
problem he or she is trying to solve. Such errors are called
logical error.
TESTING

1. Alpha testing: It is the most common Type of Testing


used in The software industry. The objective of this
Testing is to identify all possible issues or defects before
releasing it into The market or to The user. It is conducted
at the developer's site.
35
2. Beta Testing: It is a formal type of software Testing
which is carried out by The customers. It is performed in I
a real environment before releasing The products into The
market for the actual end-users. It is carried out to 2
ensure That There are no major failures in The software I
or product and it satisfies The business requirement. Beta
Testing is successful when The customer accepts The
software.

3. White Box Testing: White box Testing is based on The


knowledge about the infernal logic of an application's
code. IT is also known as Glass box Testing, Internal
Software and code working should be known for
performing this type of Testing. These Tests are based on
The coverage of the code statements, branches, paths,
conditions etc.

4. Black Box Testing: IT is a software Testing, method in

which The internal structure or design of The item to be


Tested is not known to The Tester. This method of Testing
can be applied virtually to every level of The
Software Testing.

36
MAINTENANCE
Programming maintenance refers to the modifications in
the program. After it has been completed, in order to meet
changing requirement or to take care of the errors that
shown up. There are four types of maintenance:

1. Corrective Maintenance: When the program after


compilation shows error because of some unexpected
situations, untested areas such errors are fixed up by
Corrective maintenance.

2. Adaptive Maintenance: Changes in the environment in


which an information system operates may lead to system
management. To accommodate changing needs time to
time maintenance is done and is called Adaptive
maintenance.

3. Preventive Maintenance: If possible the errors could


be anticipated before they actually occur: the maintenance
is called Preventive maintenance.

4. Perfective Maintenance: In this rapidly changing


world, information technology is the fastest growing area.
If the existing system is maintained to keep tuned with the
new features, new facilities, new capabilities, it is said to
be Perfective maintenance.

37
HARDWARE REQUIREMENTS

 A computer/laptop with Operating System-


Windows 7 or above (x86 64-bit CPU -Intel /
AMD architecture)

 4 GB RAM

 5 GB free disk space

SOFTWARE REQUIREMENTS

 Python 3.8.x or higher version

 MySQL

38
LIMITATIONS OF THE PROJECT

 Needs more customization to fulfill every need


of the organization

 More functionalities can be added as per the


requirement of the student like medical details,
personal details, etc.

 Provision to print hard copies and many other


modules can be added to the project

39
CONCLUSION

The project entitled "Student Management


System" is developed using Python and MYSQL
database to computerize the process of
management of student records. This project
covers only the basic features required.

40
BIBLIOGRAPHY

 Kips Class 12th Computer Science with Python

Textbook

 https://stackoverflow.com/

41

You might also like