Computer Science PROJECT FILE
Computer Science PROJECT FILE
DELHI-110040
COMPUTER SCIENCE
WITH PYTHON
Subject Code- 083
Project File
Submitted By:
Name: Ria Bhajjan
Class: 12- Science
1
2022-2023
LIBRARY MANAGEMENT
SYSTEM PROJECT
SUBJECT-
COMPUTER SCIENCE WITH PYTHON
CODE - 083
THE VIVEKANAND SCHOOL
2
CERTIFICATE
This is to certify that Ria Bhajjan, Roll No: ____________ has successfully
PROJECT in the subject Computer Science (083) laid down in the regulations of
CBSE for the purpose of Practical Examination in Class XII to be held in THE
VIVEKANAND SCHOOL
3
TABLE OF CONTENTS [ T O C ]
01 ACKNOWLEDGEMENT 05
02 INTRODUCTION 06
04 PROPOSED SYSTEM 07
07 FLOW CHART 16
08 SOURCE CODE 18
09 OUTPUT 24
10 TESTING 25
12 INSTALLATION PROCEDURE 29
13 BIBLIOGRAPHY 30
4
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of
this project.
I express a deep sense of gratitude to almighty God for giving me strength for
the successful completion of the project.
INTRODUCTION
This project is about a software made for Libraries. Library management systems can help
libraries with their data management process. It automates many of the tasks that are usually
done by a librarian. The most important part is that it not only improves data accuracy but also
optimizes workflows for staff members.
5
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
PROPOSED SYSTEM
Today one cannot afford to rely on the fallible human beings who really want to
stand against today’s merciless competition where not too wise saying “to err is
human” is 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
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 had
6
to be done but now software products in this organization have made their work faster
and easier. Now only this software has to be loaded on the computer and work can be
done.
This prevents a lot of time and money. The work becomes fully automated and
any information regarding the organization can be obtained by clicking the button.
7
reviewing the output of each phase to ensure the system is being built to deliver the
needed functionality.
PHASES OF SYSTEM DEVELOPMENT LIFE CYCLE
INITIATION PHASE
8
SYSTEM CONCEPT DEVELOPMENT PHASE
The System Concept Development Phase begins after a business need or opportunity
is validated by the Agency/Organization Program Leadership and the
Agency/Organization CIO.
9
PLANNING PHASE
10
REQUIREMENTS ANALYSIS PHASE
This phase formally defines the detailed functional user requirements using
high-level requirements identified in the Initiation, System Concept, and Planning
phases. It also delineates the requirements in terms of data, system performance,
security, and maintainability requirements for the system. The requirements are
defined in this phase to a level of detail sufficient for systems design to proceed. They
need to be measurable, testable, and relate to the business need or opportunity
identified in the Initiation Phase. The requirements that will be used to determine
acceptance of the system are captured in the Test and Evaluation MasterPlan.
● Further define and refine the functional and data requirements and document
them in the Requirements Document,
● Complete business process reengineering of the functions to be supported (i.e.,
verify what information drives the business process, what information is
generated, who generates it, where does the information go, and who
processes it),
● Develop detailed data and process models (system inputs, outputs, and the
process.
● Develop the test and evaluation requirements that will be used to determine
acceptable system performance.
DESIGN PHASE
The design phase involves converting the informational, functional, and network
requirements identified during the initiation and planning phases into unified design
specifications that developers use to script programs during the development phase.
Program designs are constructed in various ways. Using a top-down approach,
designers first identify and link major program components and interfaces, then expand
design layouts as they identify and link smaller subsystems and connections. Using a
bottom-up approach, designers first identify and link minor program components and
interfaces, then expand design layouts as they identify and link larger systems and
connections. Contemporary design techniques often use prototyping tools that build
11
mock-up designs of items such as application screens, database layouts, and system
architectures. End users, designers, developers, database managers, and network
administrators should review and refine the prototyped designs in an iterative process
until they agree on an acceptable design. Audit, security, and quality assurance
personnel should be involved in the review and approval process. During this phase,
the system is designed to satisfy the functional requirements identified in the previous
phase. Since problems in the design phase could be very expensive to solve in the
later stage of the software development, a variety of elements are considered in the
design to mitigate risk. These include:
12
various techniques to develop computer programs. The large transaction oriented
programs associated with financial institutions have traditionally been developed
using procedural programming techniques. Procedural programming involves the
line-by-line scripting of logical instructions that are combined to form a
program.Effective completion of the previous stages is a key factor in the success
of the Development phase. The Development phase consists of:
● Testing as a deployed system with end users working together with contract
personnel
13
IMPLEMENTATION PHASE
This phase is initiated after the system has been tested and accepted by the
user. In this phase, the system is installed to support the intended business functions.
System performance is compared to performance objectives established during the
planning phase. Implementation includes user notification, user training, installation of
hardware, installation of software onto production computers, and integration of the
system into daily work processes. This phase continues until the system is operating
in production in accordance with the defined user requirements.
14
This project is made using two python scripts:
We will write python code for making tables and database in mysql server. We will use python
mysql connectivity for this. After writing the code we will execute this script only once. And
after executing all the tables and database will be created in the server.
Now we have made our database in mysql server using python idle. So now we will write the
python code so that we can insert and access data from our database. We will create several
functions for our interface of project. These functions will drive the working of our project /
system.
SOURCE CODE
MYSQL
We will create a database “l1” and in that we will create 3 tables.
import mysql.connector as a
con = a.connect(host="localhost",
user="root",
passwd="12345")
c = con.cursor()
sql1 = "create database l1"
c.execute(sql1)
sql2 = "use l1"
c.execute(sql2)
15
sql3 = "create table books (bname varchar(50),bcode varchar(10), total int, subject
varchar(50))"
c.execute(sql3)
sql4 = "create table issue (sname varchar(50),regno varchar(10), bcode varchar(10),
idate varchar(10))"
c.execute(sql4)
sql5 = "create table submit (sname varchar(50), regno varchar(10), bcode varchar(10),
sdate varchar(10))"
c.execute(sql5)
con.commit()
PYTHON IDLE
import mysql.connector as a
con = a.connect (host="localhost",user="root",passwd="12345",database="l1")
def addbook():
bn = input("Enter BOOK Name : ")
c = input("Enter BOOK Code : ")
t = input("Total Books : ")
s = input("Enter Subject : ")
data = (bn,c,t,s)
sql = 'insert into books values(%s,%s,%s,%s)'
c = con.cursor()
c.execute(sql,data)
con.commit()
print(">----------------------------------------------------------------------------------------<")
print("Data Entered Successfully")
main()
def issueb():
n = input("Enter Name : ")
r = input("Enter Reg No : ")
co = input("Enter Book Code : ")
d = input("Enter Date : ")
16
a = "insert into issue values(%s,%s,%s,%s)"
data = (n,r,co,d)
c = con.cursor()
c.execute(a,data)
con.commit()
print(">--------------------------------------------------------------------------------------------<")
print("Book issued to : ",n)
bookup(co,-1)
def submitb():
n = input("Enter Name : ")
r = input("Enter Reg No : ")
co = input("Enter Book Code : ")
d = input("Enter Date : ")
a = "insert into submit values(%s,%s,%s,%s)"
data = (n,r,co,d)
c = con.cursor()
c.execute(a,data)
con.commit()
print(">--------------------------------------------------------------------------------------------<")
print("Book Submitted from : ",n)
bookup(co,1)
def bookup(co,u):
a = "select TOTAL from books where BCODE = %s"
data = (co,)
c = con.cursor()
c.execute(a,data) # (10,)
myresult = c.fetchone()
t = myresult[0] + u
sql = "update books set TOTAL = %s where BCODE = %s"
d = (t,co)
c.execute(sql,d)
con.commit()
main()
17
def rbook():
ac = input("Enter Book Code : ")
a = "delete from books where BCODE = %s"
data = (ac,)
c = con.cursor()
c.execute(a,data)
con.commit()
main()
def dispbook():
a = "select * from books"
c = con.cursor()
c.execute(a)
myresult = c.fetchall() # [(1,2,3,4),(1,2,3,4)]
for i in myresult:
print("Book Name : ",i[0])
print("Book Code : ",i[1])
print("Total : ",i[2])
print("Subject : ",i[3])
print(">--------------------------------<")
main()
def ibooks():
a = "select * from issue"
c = con.cursor()
c.execute(a)
myresult = c.fetchall() # [(1,2,3,4),(1,2,3,4)]
for i in myresult:
print("Student Name : ",i[0])
print("Reg No : ",i[1])
print("Book Code : ",i[2])
print("Issue Date : ",i[3])
print(">--------------------------------<")
main()
18
def main():
print("""
LIBRARY MANAGER
def pswd():
ps = input("Enter Password : ")
if ps == "py143":
main()
else:
print("Wrong Password")
19
pswd()
pswd()
OUTPUT SCREENS
20
21
TESTING
TESTING METHODS
Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of view that
a test engineer takes when designing test cases.
SPECIFICATION-BASED TESTING
22
output from, the test object. This level of testing usually requires thorough test cases
to be provided to the tester, who then can simply verify that for a given input, the output
value (or behaviour), either "is" or "is not" the same as the expected value specified in
the test case. Specification-based testing is necessary, but it is insufficient to guard
against certain risks
The black box tester has no "bonds" with the code, and a tester's perception is
very simple: a code must have bugs. Using the principle, "Ask and you shall receive,"
black box testers find bugs where programmers don't. But, on the other hand, black
box testing has been said to be "like a walk in a dark labyrinth without a flashlight,"
because the tester doesn't know how the software being tested was actually
constructed.
That's why there are situations when (1) a black box tester writes many test
cases to check something that can be tested by only one test case, and/or (2) some
parts of the back end are not tested at all. Therefore, black box testing has the
advantage of "an unaffiliated opinion," on the one hand, and the disadvantage of "blind
exploring," on the other.
White box testing, by contrast to black box testing, is when the tester has access
to the internal data structures and algorithms (and the code that implement these)
23
CODE COMPLETENESS EVALUATION
White box testing methods can also be used to evaluate the completeness of a
test suite that was created with black box testing methods. This allows the software
team to examine parts of a system that are rarely tested and ensures that the most
important function points have been tested.
X. Printer : required
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
24
BIBLIOGRAPHY
***
25