Student management system
Student management system
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
3
INTRODUCTION
4
OBJECTIVES OF THE PROJECT
5
SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)
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
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.
2. No Manual Work
5. User-friendly Software
6. Flexibility
7. Beneficial
9
ABOUT PYTHON
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.
12
Python File Handling
r", for reading. "w", for writing. “a ", for appending. "r+ ",
for both reading and writing
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.
16
SETTING THE CONNECTION BETWEEN
PYTHON AND DATABASE
con=driver.connect(host=’localhost’,user=’root’,password=
0987,charset=’utf8’)
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
34
1. Compile-time errors: Errors that occurs during
compilation of a program is called compile time error. It
has two types as follows:
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:
37
HARDWARE REQUIREMENTS
4 GB RAM
SOFTWARE REQUIREMENTS
MySQL
38
LIMITATIONS OF THE PROJECT
39
CONCLUSION
40
BIBLIOGRAPHY
Textbook
https://stackoverflow.com/
41