Compter Project
Compter Project
BANKURA-722183
A I S S C E Practical 2024-25
Computer Science(083)
PROJECT FILE
Name:- _________________________
Class: - ____________________________
Session: - _____________________________
CERTIFICATE
DAV PUBLIC SCHOOL, DVC, MTPS
BANKURA-722183
By:
1. Aditya Anoop - XII Science[Board Roll: ______________]
2. Himshreya Mondal – XII Science[Board Roll:_____________]
3. Preyashi Chakraborty – XII Science[Board Roll:______________]
C O N T E N T S
1. Introduction -------------------------------------------------------------------------------- 1
5. System Implementation
8. References -------------------------------------------------------------------------------- 20
0
1. Introduction
purpose of the software project is to develop the Management Information System (MIS)
particular subject or purpose, capable to produce different reports relevant to the user. An
application program is tied with the database for easy access and interface to the database.
Using Application program or front-end, we can store, retrieve and manage all
This software, being simple in design and working, does not require much of training to
users, and can be used as a powerful tool for automating Student Management System.
During coding and design of the software Project, Python, a powerful front-end tool is
used. As a back-end a powerful, open source RDBMS, My SQL is used as per requirement
1
2. Objective & Scope of the Project
✓ To provide a user friendly, Graphical User Interface (GUI) based integrated and
centralized database based on client-server architecture for MIS activities.
✓ The proposed system should maintain all the records and transactions, and should
generate the required reports and information when required.
✓ To identify the critical operation procedure and possibilities of simplification using
modern IT tools and practices.
In its current scope, the software enables user to retrieve and update the information from
centralized database designed with MySQL. This software does not require much training
time of the users due to limited functionality and simplicity.
During the development of this project, Python, a powerful, open source event-driven
form-based development environment is used for modular design and future
expandability of the system.
Despite of the best effort of the developer, the following limitations and functional
boundaries are visible, which limits the scope of this application software.
1. This software can store records and produce reports in pre-designed format in soft
copy. There is no facility yet to produce customized reports. Only specified reports
are covered. So far as future scope of the project is concerned, firstly it is open to
any modular expansion i.e. other modules or functions can be designed and
embedded to handle the user need in future. Any part of the software and reports
can be modified independently without much effort.
2
3. Theoretical Background
A table is a collection of data about a specific topic, such as products or suppliers. Using a
separate table for each topic means you can store that data only once, which makes your
database more efficient and reduces data-entry errors. Table organises data into columns
(called fields) and rows (called records).
A Primary key is one or more fields whose value or values uniquely identify each record
in a table. In a relationship, a primary key is used to refer to specific record in one table
from another table. A primary key is called foreign key when it is referred to from another
table.
To find and retrieve just the data that meets conditions you specify, including data from
multiple tables, create a query. A query can also update or delete multiple records at the
same time, and perform built-in or custom calculations on your data.
3
purpose software package called a Database Management System (DBMS). Some
commercially available DBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and
Sybase. A database management system, therefore, is a combination of hardware and
software that can be used to set up and monitor a database, and can manage the updating
and retrieval of database that has been stored in it. Most of the database management
systems have the following capabilities:
MySQL, the most popular Open Source SQL database management system, is developed,
distributed, and supported by Oracle Corporation. MySQL is named after co-founder
Monty Widenius's daughter, My. The name of the MySQL Dolphin (our logo) is “Sakila”.
4
• MySQL is based on SQL.
A relational database stores data in separate tables rather than putting all the data
in one big storeroom. This adds speed and flexibility. The SQL part of “MySQL”
stands for “Structured Query Language.” SQL is the most common standardized
language used to access databases and is defined by the ANSI/ISO SQL Standard.
The SQL standard has been evolving since 1986 and several versions exist. In this
manual, “SQL-92” refers to the standard released in 1992, “SQL: 1999” refers to the
standard released in 1999, and “SQL: 2003” refers to the current version of the
standard.
• MySQL software is Open Source.
Open Source means that it is possible for anyone to use and modify the software.
Anybody can download the MySQL software from the Internet and use it without
paying anything. If you wish, you may study the source code and change it to suit
your needs. The MySQL software uses the GPL (GNU General Public License),
• The MySQL Database Server is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server also has a
practical set of features developed in close cooperation with our users. You can find
a performance comparison of MySQL Server with other database managers on our
benchmark page. MySQL Server was originally developed to handle large
databases much faster than existing solutions and has been successfully used in
highly demanding production environments for several years. Although under
constant development, MySQL Server today offers a rich and useful set of
functions. Its connectivity, speed, and security make MySQL Server highly suited
for accessing databases on the Internet.
• MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that consists of a multi-
threaded SQL server that supports different backends, several different client
programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs).
5
• Provides the server as a separate program for use in a client/server networked
environment, and as a library that can be embedded (linked) into standalone
applications. Such applications can be used in isolation or in environments where
no network is available.
• Password security by encryption of all password traffic when you connect to a
server.
• Support for large databases. We use MySQL Server with databases that contain 50
million records. We also know of users who use MySQL Server with 200,000 tables
and about 5,000,000,000 rows.
• MySQL client programs can be written in many languages. A client library written
in C is available for clients written in C or C++, or for any language that provides C
bindings.
• APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available,
enabling MySQL clients to be written in many languages.
• The Connector/ODBC (MyODBC) interface provides MySQL support for client
programs that use ODBC (Open Database Connectivity) connections.
• The Connector/J interface provides MySQL support for Java client programs that
use JDBC connections. Clients can be run on Windows or Unix. Connector/J source
is available.
➢ It provides rich data types and easier to read syntax than any other programming
languages
➢ It is a platform independent scripted language with full access to operating system
API's
➢ Compared to other programming languages, it allows more run-time flexibility
➢ It includes the basic text manipulation facilities of Perl and Awk
➢ A module in Python may have one or more classes and free functions
➢ Libraries in Pythons are cross-platform compatible with Linux, Macintosh, and
Windows
➢ For building large applications, Python can be compiled to byte-code
➢ Python supports functional and structured programming as well as OOP
6
➢ It supports interactive mode that allows interacting Testing and debugging of
snippets of code
➢ In Python, since there is no compilation step, editing, debugging and testing is fast.
The Python modules that come preloaded with Python are called "standard library
modules".
Python can have three types of functions i.e., built-in functions, functions in modules and
user-defined functions.
(i) print() (ii) input() (iii) sorted() (iv) bool() (v) min() (vi) any()
User defined functions: A user defined function can be defined as per the following
format: def <function name>([parameters])
Functions returning a value is known as fruitful function and a function not returning any
value is known as a void or non-fruitful function.
Values that are passed to a function are known as arguments and the values being
received in function header are known as parameters.
Global scope: names defined in the top level segment of a program have a global scope.
Local scope: names defined inside a function body have a local scope.
7
The try block lets you test a block of code for errors.
The else block lets you execute code when there is no error.
The finally block lets you execute code, regardless of the result of the try- and except
blocks.
Finally
The finally block, if specified, will be executed regardless if the try block raises an error or
not. The finally block is always executed no matter whether there is an exception or not.
The finally block is optional, and, for each try block, there can be only one finally block
8
4. Python – MySQL Connectivity
We need to know the following detail of the MySQL server to perform the connection
from Python.
➢ Username – i.e., the username that you use to work with MySQL Server. The
default username for the MySQL database is a root
➢ Password – Password is given by the user at the time of installing the MySQL
database. If you are using root then you won’t need the password.
➢ Host Name – is the server name or Ip address on which MySQL is running. if you
are running on localhost, then you can use localhost, or it’s IP, i.e. 127.0.0.0
➢ Database Name – Database name to which you want to connect. Here we are using
Database named ‘Student‘ because we have already created this for our example.
Note: We are using the MySQL Connector Python module to communicate with MySQL
import mysql.connector
This line imports the MySQL Connector Python module in your program so you can use
this module’s API to connect MySQL.
mysql.connector.connect()
➢ Using this method we can connect the MySQL Database, this method accepts four
required parameters: Host, Database, User and Password that we already
discussed.
➢ connect() method established a connection to the MySQL database from Python
application and returned a MySQLConnection object. Then we can use
MySQLConnection object to perform various operations on the MySQL Database.
9
➢ The Connect() method can throw an exception, i.e. Database error if one of the
required parameters is wrong. For example, if you provide a database name that is
not present in MySQL, then Python application throws an exception. So check the
arguments that you are passing to this method.
connection.is_connected( )
is_connected() is the method of the MySQLConnection class through which we can verify
is our python application connected to MySQL.
connection.cursor( )
This method returns a cursor object. Using a cursor object, we can execute SQL queries.
The MySQLCursor class instantiates objects that can execute operations such as SQL
statements.
Cursor objects interact with the MySQL server using a MySQLConnection object.
cursor.close()
Using the cursor’s close method we can close the cursor object. Once we close the cursor
object, we cannot execute any SQL statement.
connection.close()
At last, we are closing the MySQL database connection using a close() method of
MySQLConnection class.
10
5. System Implementation
PC with Ryzen 3, Intel Celeron or I3 processor having 4 GB RAM, SVGA and other
required devices.
11
6. System Design & Development
This python Student Management System implemented data storage in MySQL Database.
This Database contains the different tables to maintain the data about the library. This
project has different features like
1. Accept: This method takes details from the user like name, roll number, and marks
for two different subjects.
2. Display: This method displays the details of every student.
3. Search: This method searches for a particular student from the list of students. This
method will ask the user for roll number and then search according to the roll
number
4. Delete: This method deletes the record of a particular student with a matching roll
number.
5. Update: This method updates the roll number of the student.
This method will ask for the old roll number and new roll number. It will replace
the old roll number with new roll number.
This project store the data in database, this Project created a MySQL database with name
"Student".
This Database has 3 tables to store and retrieve the data about the LMS system.
Database Design
For creating the Student Management System in Python that uses MySQL database we
need to connect Python with MySQL.
For making a connection we need to install mysqlconnector which can be done by
writing the following command in the command prompt on Windows.
Now after successful installation of mysqlconnector we can connect MySQL with Python
which can be done by writing the following code
import mysql.connector
con = mysql.connector.connect(
host="localhost", user="root", password="password", database="Students")
12
Accept
# Method to enter new student details
def accept(self, Name, Rollno, marks1, marks2 ):
# Creates a new class constructor
# and pass the details
ob = Student(Name, Rollno, marks1, marks2 )
# list containing objects of student class
ls.append(ob)
Display
Search
# Search Function
def search(self, rn):
for i in range(ls.__len__()):
# iterate through the list containing
# student object and checks through
# roll no of each object
if(ls[i].rollno == rn):
# returns the object with matching
# roll number
return i
Delete
# Delete Function
def delete(self, rn):
# Calls the search function
# created above
i = obj.search(rn)
del ls[i]
13
Update
# Update Function
def update(self, rn, No):
# calling the search function
# of student class
i = obj.search(rn)
ls[i].rollno = No
# Search Function
def search(self, rn):
for i in range(ls.__len__()):
if(ls[i].rollno == rn):
return i
# Delete Function
14
def delete(self, rn):
i = obj.search(rn)
del ls[i]
# Update Function
def update(self, rn, No):
i = obj.search(rn)
roll = No
ls[i].rollno = roll;
# ch = int(input("Enter choice:"))
# if(ch == 1):
obj.accept("A", 1, 100, 100)
obj.accept("B", 2, 90, 90)
obj.accept("C", 3, 80, 80)
# elif(ch == 2):
print("\n")
print("\nList of Students\n")
for i in range(ls.__len__()):
obj.display(ls[i])
# elif(ch == 3):
print("\n Student Found, ")
s = obj.search(2)
obj.display(ls[s])
# elif(ch == 4):
obj.delete(2)
print(ls.__len__())
15
print("List after deletion")
for i in range(ls.__len__()):
obj.display(ls[i])
# elif(ch == 5):
obj.update(3, 2)
print(ls.__len__())
print("List after updation")
for i in range(ls.__len__()):
obj.display(ls[i])
# else:
print("Thank You !")
16
Output of System
Operations used,
2
List of Students
Name : A
RollNo : 1
Marks1 : 100
Marks2 : 100
Name : B
RollNo : 2
Marks1 : 90
Marks2 : 90
Name : C
RollNo : 3
Marks1 : 80
Marks2 : 80
4
Student Found,
Name : B
RollNo : 2
Marks1 : 90
Marks2 : 90
17
2
List after deletion
Name : A
RollNo : 1
Marks1 : 100
Marks2 : 100
Name : C
RollNo : 3
Marks1 : 80
Marks2 : 80
2
List after updation
Name : A
RollNo : 1
Marks1 : 100
Marks2 : 100
Name : C
RollNo : 2
Marks1 : 80
Marks2 : 80
Thank You !
18
7. User Manual
How to install?
Hardware Requirement
Intel Celeron or more upgraded processor based PC at Client/Server end.
Minimum 2 GB RAM and 10 GB HDD space (for Database) is desirable.
Standard I/O devices like Keyboard and Mouse etc.
Printer is needed for hard-copy reports.
Local Area Network(LAN) is required for Client-Server Installation
Software Requirement
Windows 7/10 OS is desirable.
Anaconda Navigator/Jupiter/Spyder should be installed with MySQL and Matplotlib
package.
MySQL Ver 5.1 with Library Database must be present at machine.
Database Installation
The software project is distributed with a backup copy of a Database named Student with
required tables. Some dummy records are present in the tables for testing purposes, which
can be deleted before inserting real data. The project is shipped with Student.sql file
which installs a database and tables in the computer system.
Note: The PC must have MySQL server with user (root) and password (root). If root
password is any other password, it can be changed by running MySQL Server Instance
Configure Wizard.
Start Program MySQL MySQL Server MySQL Server Instance Config Wizard
Provide current password of root and new password as “root” , this will change the root
password.
To install a MySQL database from a dump file (Student.sql), simply follow the following
steps.
Step 1: Copy the Lib.sql file in C:\Program files\Mysql\MySql server 5.1\Bin folder.
Step 2: Open MySQL and type the following command to create the database named
Student.
mysql> create database Student;
Step 3: Open Command Window (Start Run cmd)
Step 4: Go to the following folder using CD command of DOS.
C:\Program files\Mysql\MySql server 5.1\Bin>
Step 5: type the following command on above prompt -
C:….\bin>mysql -u root -proot Student < Student.sql>
This will create a Student database with required tables.
19
8. References
In order to work on this project titled “Student Management System”, the following books
and literature are referred by me during the various phases of development of the project.
(4) http://www.python.org/
Other than the above mentioned books, the suggestions and supervision of my teacher
and my class experience also helped me to develop this software project.
20