0% found this document useful (0 votes)
30 views24 pages

Compter Project

Uploaded by

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

Compter Project

Uploaded by

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

DAV PUBLIC SCHOOL, DVC, MTPS

BANKURA-722183
A I S S C E Practical 2024-25

Computer Science(083)

PROJECT FILE

Name:- _________________________

Roll No:- _________________________

Class: - ____________________________

Session: - _____________________________
CERTIFICATE
DAV PUBLIC SCHOOL, DVC, MTPS
BANKURA-722183

DEPARTMENT OF COMPUTER SCIENCE

This is to certify that ___________________


Roll No.__________ Studying in class XII session
2024-2025 has completed the Project based on CBSE
syllabus.
By:
1. Aditya Anoop - XII Science[Board Roll: ______________]
2. Himshreya Mondal – XII Science[Board Roll:_____________]
3. Preyashi Chakraborty – XII Science[Board Roll:______________]

_____________ ______________ _____________


Signature Signature Signature
(Internal Examiner) (External Examiner) (PRINCIPAL)
Acknowledgement
In the accomplishment of this project successfully, many
people have best owned upon me their blessing and the
heart pledged support, this time I am utilizing to thank all
the people who have been concerned with project.

I would like to thank my Computer Science teacher


Mr. A. Mishra whose valuable guidance has been the
ones that helped me patch this project and make it full
proof success his suggestions and his instructions has
served as the major contributor towards the completion
of the project.

Then I would like to thank my parents and friends who


have helped me with their valuable suggestions and
guidance has been helpful in various phases of the
completion of the project.

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

2. Objective & Scope of the Project ----------------------------------------------------- 2

3. Theoretical Background ----------------------------------------------------------------- 3

4. Python – MySQL Connectivity ------------------------------------------------------- 9

5. System Implementation

5.1 The Hardware used: ---------------------------------------------------------------- 11

5.2 The Softwares used:----------------------------------------------------------------- 11

6. System Design & Development

6.1 Database Design: -------------------------------------------------------------------- 12

6.2 Coding for System Design: -------------------------------------------------------- 14

6.3 Outputs of System: ------------------------------------------------------------------ 17

7. User Manual ------------------------------------------------------------------------------ 19

8. References -------------------------------------------------------------------------------- 20

0
1. Introduction

This software project is developed to automate the functionalities of an Student. The

purpose of the software project is to develop the Management Information System (MIS)

to automate the record keeping of different functionalities of an Student.

A MIS mainly consists of a computerized database, a collection of inter-related tables for a

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

information in proper way.

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

of the CBSE curriculum of Informatics Practices Course.

1
2. Objective & Scope of the Project

he objective of the software project is to develop a computerized MIS to automate


T the functions of a Bank. This software project is also aimed to enhance the
current record keeping system, which will help managers to retrieve the up-to-date
information at right time in right shape.

The proposed software system is expected to do the following functionality-

✓ 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

3.1 What is Database?

Introduction and Concepts:


A database is a collection of information related to a particular subject or purpose, such as
tracking customer orders or maintaining a music collection. Using any RDBMS application
software like MS SQL Server, MySQL, Oracle, Sybase etc, you can manage all your
information from a single database file. Within the file, divide your data into separate
storage containers called tables. You may and retrieve the data using queries.

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.

Role of RDBMS Application Program:


A computer database works as a electronic filing system, which has a large number of
ways of cross-referencing, and this allows the user many different ways in which to re-
organize and retrieve data. A database can handle business inventory, accounting and
filing and use the information in its files to prepare summaries, estimates and other
reports. The management of data in a database system is done by means of a general-

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:

 Creating of a table, addition, deletion, modification of records.


 Retrieving data collectively or selectively.
 The data stored can be sorted or indexed at the user's discretion and direction.
 Various reports can be produced from the system. These may be either
standardized report or that may be specifically generated according to specific user
definition.
 Mathematical functions can be performed and the data stored in the database can
be manipulated with these functions to perform the desired calculations.
 To maintain data integrity and database use.
The DBMS interprets and processes users' requests to retrieve information from a
database. In most cases, a query request will have to penetrate several layers of software in
the DBMS and operating system before the physical database can be accessed. The DBMS
responds to a query by invoking the appropriate subprograms, each of which performs its
special function to interpret the query, or to locate the desired data in the database and
present it in the desired order.

3.2 What is My SQL?

The management of data in a database system is done by means of a general-purpose


software package called a Database Management System (DBMS). Some commercially
available RDBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase.

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”.

• MySQL is a database management system.


A database is a structured collection of data. It may be anything from a simple
shopping list to a picture gallery or the vast amounts of information in a corporate
network. To add, access, and process data stored in a computer database, you need
a database management system such as MySQL Server. Since computers are very
good at handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other applications.

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).

The Main Features of MySQL

• Written in C and C++.


• Works on many different platforms.
• Uses multi-layered server design with independent modules.
• Provides transactional and non transactional storage engines.
• Designed to make it relatively easy to add other storage engines. This is useful if
you want to provide an SQL interface for an in-house database.
• Uses a very fast thread-based memory allocation system.
• Executes very fast joins using an optimized nested-loop join.
• Implements SQL functions using a highly optimized class library that should be as
fast as possible. Usually there is no memory allocation at all after query
initialization.

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.

3.3 What is Python?

Python is an object-oriented programming language created by Guido Rossum in 1989. It


is ideally designed for rapid prototyping of complex applications. It has interfaces to many
OS system calls and libraries and is extensible to C or C++. Many large companies use the
Python programming language include NASA, Google, YouTube, BitTorrent, etc.

Python programming is widely used in Artificial Intelligence, Natural Language


Generation, Neural Networks and other advanced fields of Computer Science. Python had
deep focus on code readability & this class will teach you python from basics.

➢ 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.

3.3.1 Functions in python

The act of partitioning a program into individual components is called Modularity'.

The Python modules that come preloaded with Python are called "standard library
modules".

A function is a named block of statements that can be invoked by its name.

Python can have three types of functions i.e., built-in functions, functions in modules and
user-defined functions.

Examples of Some Built-in 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])

A function in Python may or may not return a value.

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.

There are two kinds of scopes in Python

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.

Python follows LEGB rule for name scope resolution.

3.3.2 Exception handling in python

An exception is an error which happens at the time of execution of a program.

An exception is an unusual situation in a program, that is not encountered in normal


situations. It can cause the program to fail, respond abnormally or produce abnormal
outputs method is not able to handle the exception, it is thrown to its caller function. The
exception indicates that, although the event can occur, this type of event happens
infrequently when the Exceptions are managed in Python by the following blocks:

7
The try block lets you test a block of code for errors.

The except block lets you handle the error

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.

Python try except Block

The try...except block is used to handle exceptions in Python.

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

1. Use the mysql.connector.connect() method of MySQL Connector Python with


required parameters to connect MySQL.
2. Use the connection object returned by a connect() method to create a cursor object
to perform Database Operations.
3. The cursor.execute() to execute SQL queries from Python.
4. Close the Cursor object using a cursor.close() and MySQL database connection
using connection.close() after your work completes.
5. Catch Exception if any that may occur during this process.

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.

from mysql.connector import Error


mysql connector Error object is used to show us an error when we failed to connect
Databases or if any other database error occurred while working with the database.
Example ACCESS DENIED ERROR when username or password is wrong.

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

5.1 The Hardware used:

While developing the system, the used hardware are:

PC with Ryzen 3, Intel Celeron or I3 processor having 4 GB RAM, SVGA and other
required devices.

5.2 The Softwares used:

➢ Microsoft Windows as Operating System.

➢ Python or Anaconda as Front-end Development environment.

➢ MySQL as Back-end Sever with Database for Testing.

➢ MS-Word 2007 for documentation.

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

Features of Student Management System Project

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.

pip install mysqlconnector

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

# Function to display student details


def display(self, ob):
print("Name : ", ob.name)
print("RollNo : ", ob.rollno)
print("Marks1 : ", ob.m1)
print("Marks2 : ", ob.m2)
print("\n")

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

Coding for System Design


# This is simplest Student data management program in python
# Create class "Student"
class Student:
# Constructor
def __init__(self, name, rollno, m1, m2):
self.name = name
self.rollno = rollno
self.m1 = m1
self.m2 = m2

# Function to create and append new student


def accept(self, Name, Rollno, marks1, marks2 ):
# use ' int(input()) ' method to take input from user
ob = Student(Name, Rollno, marks1, marks2 )
ls.append(ob)

# Function to display student details


def display(self, ob):
print("Name : ", ob.name)
print("RollNo : ", ob.rollno)
print("Marks1 : ", ob.m1)
print("Marks2 : ", ob.m2)
print("\n")

# 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;

# Create a list to add Students


ls =[]
# an object of Student class
obj = Student('', 0, 0, 0)

print("\nOperations used, ")


print("\n1.Accept Student details\n2.Display Student Details\n" /
/ "3.Search Details of a Student\n4.Delete Details of Student" /
/ "\n5.Update Student Details\n6.Exit")

# 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,

1.Accept Student details


2.Display Student Details
3.Search Details of a Student
4.Delete Details of Student
5.Update Student Details
6.Exit

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.

(1) A Text Book on Informatics Practices


-by NCERT
(2) MySQL, Black Book
-by Steven Holzner
(2) Understanding SQL
– Gruber
(3) http://www.mysql.org/

(4) http://www.python.org/

(5) On-line Help of Python & Anaconda®

(6) Informatics Practices for class XII


-by Sumita Arora
(7) Together with Informatics Practices
(6) Various Websites of Discussion Forum and software development activities.

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

You might also like