You are on page 1of 22

CERTIFICATE

This is to certify that the Informatics Practices project entitled “SCHOOL MANAGEMENT
SYSTEM”, prepared by of class XII commerce bearing Roll , of Faculty
Senior Secondary School, Geetanagar, Guwahati-781024 embodies the result of his original
work and personal investigations carried out under direct supervision of my guidance. He
has fulfilled all the requirements relating to the submission of the project.

Signature of the Principal Signature of the subject teacher

Mr. Nilotpal Bordoloi Mrs. Oli Kakoti

Principal P.G.T. (Computer Science)

Faculty Senior Secondary School Faculty Senior Secondary School

Geetanagar, Guwahati-781024 Geetanagar, Guwahati-781024

Signature of the External Examiner

No. :
ACKNOWLEDGEMENT

On completion of my project I fill immense pleasure in expressing my sincere thanks to my


teacher Mrs. Oli Kakoti, P.G.T. (Computer Science) of Faculty Senior Secondary School,
Geetanagar, Guwahati-781024 for her valuable guidance, supervision and mental support
during the course of the study.

I would like to express my sincere thanks to Mr. Nilotpal Bordoloi, Principal, Faculty Senior
Secondary School, Geetanagar, Guwahati-781024 for his inspiration and encouragement.

My gratefulness also goes to my companions in my school for their help and valuable
suggestions in bringing out my project.

I convey my heartfelt love to all members of my family who helped me at every step.

At last, but not least I thank God the almighty for his shower of blessings without which
nothing would have been possible.

Date:

Name

Class XII, Commerce

Roll Number.

Faculty Senior Secondary School

Geetanagar, Guwahati-781024
CONTENTS
 Introduction

 Aims and Objectives

 About Programming Language

 About Database Language

 Requirements

 Header files used in Program

 Functions used in Program

 Limitations

 Source Code

 Output

 Bibliography
INTRODUCTION

Computers have made great impact on our everyday life. They are put to use for all sorts of
applications ranging from complex calculations in the field of frontline research,
engineering simulations, down to teaching, printing books and recreational games. The
ease with which computer can process data, store and retrieve it painlessly, have made
them inevitable in office and business environments. The areas of applications of
computers are confined only by limitations of human creativity and imagination in fact; any
task that can be carried out systematically can be performed by a computer. Therefore, it is
essential for every educated person, today we know about a computer, its strengths,
weaknesses, and internal structure. Thus it became the need to include the subject so as to
induce into the minds of the people the fundamentals about a computer.

A “SCHOOL MANAGEMENT SYSTEM” is developed to maintain records related to the


students of the school. This system involves the smooth running of the school. Provisions
are made to insert and modify, sale and delete the records of the school. Recording of
entries become instant and details of any content can be derived instantaneously.
AIMS and OBJECTIVES

The topic “SCHOOL MANAGEMENT SYSTEM” has been allotted to me with the aim of
testing the use of computer as a school project and makes us realize the problems that
occur during the process of developing software. Thus, the methodology is to make the
examination process more practical based and realistic by making familiar the students
with real life situations.

Its main aims and objective are:-

 To develop a database registration system for maintaining records relating to the


students and their exam.
 To search any information related to the students of the school.
 To modify the details of the students of the school.
 To delete the records related to the students of the school.
ABOUT PROGRAMMING LANGUAGE

Python is an interpreted, high-level, general-purpose programming language. Created by


Guido van Rossum and first released in 1991, Python’s design philosophy emphasizes code
readability with its notable use of significant whitespace. Its language constructs and
object-oriented approach aim to help programmers write clear, logical code for smaller and
large-scale projects.

Python is dynamically typed and garbage collected. It supports multiple programming


paradigms, including procedural, object oriented, and functional programming, Python is
often described as a “batteries included” language due to its comprehensive standard
library.

What can Python do?

 Python can be used on a server to create web applications.


 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.
 Python can be used to handle big data and perform complex mathematics.
 Python can be used for rapid prototyping, or for production-ready software
development.

Why Python?

 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines than
some other programming languages.
 Python runs on an interpreter system, meaning that code can be executed as soon as
it is written. This means that prototyping can be very quick.
 Python can be treated in a procedural way, an object-orientated way or a functional
way.

Python Syntax compared to other programming languages

 Python was designed for readability, and has some similarities to the English
language with influence from mathematics.
 Python uses new lines to complete a command, as opposed to other programming
languages which often use semicolons or parentheses.
 Python relies on indentation, using whitespace, to define scope; such as the scope of
loops, functions and classes. Other programming languages often use curly-brackets
for this purpose.

 Paradigm – Multi paradigm; functional, imperative, object oriented, reflective


 Designed by – Guido van Rossum
 Developer – Python Software Foundation
 First appeared – 1990
 Website – www.python.org
ABOUT DATABASE LANGUAGE
A database is a separate application that stores a collection of data. Each database has one
or more distinct APIs for creating, accessing, managing, searching and replicating the data
it holds.
Other kinds of data stores can also be used, such as files on the file system or large hash
tables in memory but data fetching and writing would not be so fast and easy with those
type of systems.
Nowadays, we use relational database management systems (RDBMS) to store and
manage huge volume of data. This is called relational database because all the data is
stored into different tables and relations are established using primary keys or other keys
known as foreign keys.

MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL
is developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL
is becoming so popular because of many good reasons −
 MySQL is released under an open-source license. So you have nothing to pay to use
it.
 MySQL is a very powerful program in its own right. It handles a large subset of the
functionality of the most expensive and powerful database packages.
 MySQL uses a standard form of the well-known SQL data language.
 MySQL works on many operating systems and with many languages including PHP,
PERL, C, C++, JAVA, etc.
 MySQL works very quickly and works well even with large data sets.
 MySQL is very friendly to PHP, the most appreciated language for web
development.
 MySQL supports large databases, up to 50 million rows or more in a table. The
default file size limit for a table is 4GB, but you can increase this (if your operating
system can handle it) to a theoretical limit of 8 million terabytes (TB).
 MySQL is customizable. The open-source GPL license allows programmers to
modify the MySQL software to fit their own specific environments.

REQUIREMENTS
Operating System- Windows 98/2000/XP/Vista/Linux/Windows 7/Windows 10

Application Software- Python , Mysql

Hardware Requirements:

Minimum Required

 Processor Pentium IV
 Mouse button Standard
 Keyboard Standard(101 keys)
 Monitor 14inch
 FDD 1.44Mb
 HDD 80Gb
 RAM 1Gb
HEADER FILES USED IN PROGRAM

import os

import platform

import mysql.connector
FUNCTIONS USED IN PROGRAM

 insert( ) – To insert the records of the students in the database.

 display( ) – To display the records of the students from the database.

 search(nm) – To display the records of the students from the database by searching

the name of the student.

 update( ) – To update the records of the students in the database.

 delete( ) – To delete the records of the students from the database.

 insert_ex( ) – To insert the records of the examination details of the students in the

database.

 display_ex( ) – To display the records of the examination details of the students from

the database.

.
LIMITATIONS

1. Only the basic information of the students can be recorded in the program.

2. There is no built-in data backup system.

3. There is no provision for printing the details.

4. Absence of multi level password for entry into the main menu.
SOURCE CODE

import os
import platform
import mysql.connector

#=====STUDENT MANAGEMENT========
def insert():
sname=input("Enter Student Name : ")
admno=int(input("Enter Admission No : "))
dob=input("Enter Date of Birth(yyyy-mm-dd): ")
cls=input("Enter class for admission: ")
cty=input("Enter City : ")
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql="INSERT INTO student(sname,admno,dob,cls,cty) VALUES
( '%s' ,'%d','%s','%s','%s')"%(sname,admno,dob,cls,cty)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()

def display():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM student"
cursor.execute(sql)
print("-"*70)
print("Student Name Adm. No. DOB Class City")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t",i[2],"\t ",i[3],"\t ",i[4]," \t")
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()

def search(nm):
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM student where sname=%s"
val=(nm,)
cursor.execute(sql,val)
print("-"*70)
print("Student Name Adm. No. DOB Class City")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t",i[2],"\t ",i[3],"\t ",i[4]," \t")
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()

def update():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
tempst=int(input("Enter Admission No : "))
temp=input("Enter new class : ")
cursor.execute("update student set cls='"+temp+"' where admno='"+str(tempst)+"'")
db.commit()
except Exception as e:
print (e)
db.close()

def delete():
temp=int(input("\nEnter adm no to be deleted : "))
try:
ans=input("Are you sure you want to delete the record(y/n) : ")
if ans=='y' or ans=='Y':
cursor.execute("delete from student where admno='"+str(temp)+"'")
db.commit()
except Exception as e:
print (e)
db.close()

#=========EXAM MANAGEMENT============

def insert_ex():
roll=int(input("Enter Admission No : "))
sname=input("Enter the name : ")
print("Enter the marks of 5 subject")
eng=int(input("ENGLISH : "))
math=int(input("MATH : "))
sc=int(input("SCIENCE : "))
sst=int(input("SOCIAL SC. : "))
ass=int(input("ASSAMESE : "))

db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql="INSERT INTO exam(roll,sname,eng,math,sc,sst,ass) VALUES
( '%d' ,'%s','%d','%d','%d','%d','%d')"%(roll,sname,eng,math,sc,sst,ass)
try:
cursor.execute(sql)
db.commit()
except:
db.rollback()
db.close()

def display_ex():
try:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
sql = "SELECT * FROM exam"
cursor.execute(sql)
print("-"*70)
print("Roll No. Name. English Math Science Social. Sc. Assamese")
print("-"*70)
for i in cursor:
print(i[0],"\t",i[1],"\t\t",i[2],"\t",i[3],"\t",i[4],"\t\t",i[5],"\t\t",i[6],"\t")
per=i[2]+i[3]+i[4]+i[5]+i[6]/5
print("Percentage = ",per)
if per>=90:
print("Grade = A")
elif per>=80 and per<90:
print("Grade = B")
elif per>=70 and per<80:
print("Grade = C")
elif per>=60 and per<70:
print("Grade = D")
elif per>=50 and per<60:
print("Grade = E")
else:
print("Grade = FAIL")
print("-"*70)
print("-"*70)
except:
print ("Error: unable to fetch data")
db.close()

while True:
db =
mysql.connector.connect(host="localhost",user="root",passwd="root",database="school")
cursor = db.cursor()
print('-----------------------------------\nWELCOME TO SCHOOL MANAGEMENT SYSTEM\
n-----------------------------------')
print("1.STUDENT MANAGEMENT")
print("2.EXAM MANAGEMENT")
ch=int(input("\nEnter ur choice (1-2) : "))
if ch==1:
print('\nWELCOME TO STUDENT MANAGEMENT SYSTEM\n')
print('a.NEW ADMISSION')
print('b.DISPLAY DETAILS')
print('c.SEARCH')
print('d.UPDATE')
print('e.DELETE')
c=input("Enter ur choice (a-c) : ")
if c=='a':
insert()
elif c=='b':
display()
elif c=='c':
nm=input(" Enter the name of the student :")
search(nm)
elif c=='d':
update()
elif c=='e':
delete()
else:
print('Enter correct choice...!!')

elif ch==2:
print('WELCOME TO EXAM MANAGEMENT SYSTEM')
print('a.EXAM DETAILS')
print('b.DISPLAY DETAILS ')
c=input("Enter ur choice : ")
if c=='a':
insert_ex()
elif c=='b':
display_ex()
else:
print('Enter correct choice...!!')
else:
print('Enter correct choice..!!')
OUTPUT

Fig: Main Menu

Fig: Insert records in the student table


Fig: Display details of the student

Fig: Search records of the student


Fig: Update the student records

Fig: Insert the exam details of a student


Fig: Display the exam details of the student
BIBLIOGRAPHY
 Google Search

 www.wikipedia.org

 www.w3schools.com

 Informatics Practices with Python Class XII (Sumita Arora)

You might also like