Python Dbms Project New One by Sagar Singh Rawat
Python Dbms Project New One by Sagar Singh Rawat
Python Dbms Project New One by Sagar Singh Rawat
ON
“Book Inventory”
The most awaited moment of any endeavor is successful completion, but nothing can be done successfully
if done alone. Success is the outcome of contribution and consistent help of various persons and we thank
those ones who helped us in successful completion of this project.
Primarily I would like to thank Prof (Dr.) Sonal Sharma, Dean-USCS for providing a healthy and
encouraging environment to study.
I profusely thankful to the Dr. Monisha Awasthi, Program Coordinator- BCA 2nd Year, Associate
Professor-USCS for providing all the required resources in the successful completion of my project report.
I express my thanks to Mr. Ashish Vishwakarma, Project Mentor and Assistant Professor-USCS. He
has been generous enough to provide me an opportunity and accepting my candidature for the most
valuable guidance and affordable treatment given to us at every stage to boost my morale.
I hereby declare that the project report entitled Title of Your Project submitted by Sagar Singh Rawat to
Uttaranchal School of Computing Sciences. The project report was done under the guidance of Mr. Ashish
Vishwakarma, Assistant Professor-USCS. I further declare that the work reported in this project report has
not been submitted and will not be submitted, either in part or in full, for the award of any other degree or
diploma in this university or any other university or institute.
Roll No: 52
B.C.A:- 3rd Semester
CERTIFICATE
This is to certify Sagar Singh Rawat student of BCA 3rd Semester, of Uttaranchal School of
Computing Sciences, Dehradun, has completed the Project Report for the topic Book Inventory for
the session (2023- 2024).
We are creating a Window application for “BOOK INVENTORY” In Python and SQL
language by using IDLE Python & My SQL.
A Book Inventory system is a software application that is designed to help manage and
organize is a collection of books .this system is commonly used by libraries ,schools ,
bookstores, and individuals ,who have large number of books to keep track of the book
management system typically consists of a database that contains information about each
Book ,such as its title ,author , ISBM, publication date, and genre .
The Book Inventory system can help automate many tasks related to book management,
such as adding new books to the database, tracking book loans, and generating reports on
the collection. This system allows users to easily search for books based on various criteria,
such as author or title, and can even provide recommendation based on previous reading
history or user preferences.
Book Inventory are designed to save time and increase efficiency in managing a large
number of books. They can also help reduce errors and minimize the risk of losing track of
books, which is especially important for libraries and other organization that have a
responsibility to maintain accurate records.
Overall, A Book Inventory is an essential tool for anyone who want to effectively manage
and organize their book collection, whether it is for personal use or for a large
organization. With the ability to quickly and easily track and organize book, this system
can save time, reduce errors, and make managing a collection of books much simpler and
more efficient.
OBJECTIVE
EXISTING SYSTEM
PROPOSED SYSTEM
The Book Inventory is a software application which avoids more manual hours in taking the
book, that need to spend in record keeping and generating reports. Maintaining of user details
is complex in manual system in terms of agreements, royalty and activities. This all have to
be maintained in ledgers or books. Co-coordinators needs to verify each record for small
information also.
Software Used
Hardware Used
Technology Used
Python, SQL
MODULES
Admin
1. Add Book Records
2. Delete Book Record
3. Delete Full Inventory
4. Update Book Details
5. Change Book Availability
6. View All Book Present In Database
SYSTEM DESIGN
The way that is followed by carrying on with the development of application is as followed.
DEFINING A PROBLEM
Defining a problem is one of the important activities of the project. The objective is to define
precisely the problem to be solved and there by determined the scope of the new system. The
phase consists of two main tasks. The fast task within this activity is to review the
organization needs to originally initiate the project. The second task is to identify, at an
abstractor general level, the expected capability of the new system. Thus, it helps to define
the goal to we achieved and the boundaries of your system. A clear understanding of the
problem will help using building a better system and reduce the risk of project failure. It also
specifies there source that has to be made available to the project. Three important factor
project goals, project bounce and the resource limits are sometimes called the projects in term
of reference.
FLOW CHART
A flow chart is a diagram of the steps in a process and their sequences. Also known as a process flow
diagram or process map.
START
MAIN MENU
BOOK NAME
DATABASE
AUTHOR NAME
BOOK ID ENTER
SELECT PARTICULAR
DELETE BOOK RECORDS RECORD FOR DELETE ENTER
BOOK ID
UPDATE BOOK DETAILS INPUT
AUTHOR NAME
AUTHOR NAME
ENTER
DATA FLOW DIAGRAM
DISPLAY
REPORT
ADMIN COMMAND
ADD BOOK
COMMAND BOOK ID
DATABASE
BOOK NAME
COMMAND
AUTHOR NAME
A Gantt chart is a project management tool that shows project tasks on a timeline. It is a visual bar
graph representation of a project’s schedule. Typically, the rows comprise different project tasks, often
drilling down to individual lessons, with the timeline forming the chart’s columns
NOVEMBER
1.1 Requirements
1.3 Design
1.4 Review
1.5 Development
2.2 Design
1.6 Testing
CODING
# Connecting to Database
connector = sqlite3.connect('library.db')
cursor = connector.cursor()
connector.execute(
'CREATE TABLE IF NOT EXISTS Library (BK_NAME TEXT, BK_ID TEXT PRIMARY KEY
NOT NULL, AUTHOR_NAME TEXT, BK_STATUS TEXT, CARD_ID TEXT)'
)
# Functions
def issuer_card():
Cid = sd.askstring('Issuer Card ID', 'What is the Issuer\'s Card
ID?\t\t\t')
if not Cid:
mb.showerror('Issuer ID cannot be zero!', 'Can\'t keep
Issuer ID empty, it must have a value')
else:
return Cid
def display_records():
global connector, cursor
global tree
tree.delete(*tree.get_children())
def clear_fields():
global bk_status, bk_id, bk_name, author_name, card_id
bk_status.set('Available')
for i in ['bk_id', 'bk_name', 'author_name', 'card_id']:
exec(f"{i}.set('')")
bk_id_entry.config(state='normal')
try:
tree.selection_remove(tree.selection()[0])
except:
pass
def clear_and_display():
clear_fields()
display_records()
def add_record():
global connector
global bk_name, bk_id, author_name, bk_status
if bk_status.get() == 'Issued':
card_id.set(issuer_card())
else:
card_id.set('N/A')
if surety:
try:
connector.execute(
'INSERT INTO Library (BK_NAME, BK_ID,
AUTHOR_NAME, BK_STATUS, CARD_ID) VALUES (?, ?, ?, ?, ?)',
(bk_name.get(), bk_id.get(),
author_name.get(), bk_status.get(), card_id.get()))
connector.commit()
clear_and_display()
def view_record():
global bk_name, bk_id, bk_status, author_name, card_id
global tree
if not tree.focus():
mb.showerror('Select a row!', 'To view a record, you
must select it in the table. Please do so before continuing.')
return
current_item_selected = tree.focus()
values_in_selected_item = tree.item(current_item_selected)
selection = values_in_selected_item['values']
bk_name.set(selection[0]) ; bk_id.set(selection[1]) ;
bk_status.set(selection[3])
author_name.set(selection[2])
try:
card_id.set(selection[4])
except:
card_id.set('')
def update_record():
def update():
global bk_status, bk_name, bk_id, author_name, card_id
global connector, tree
if bk_status.get() == 'Issued':
card_id.set(issuer_card())
else:
card_id.set('N/A')
clear_and_display()
edit.destroy()
bk_id_entry.config(state='normal')
clear.config(state='normal')
view_record()
bk_id_entry.config(state='disable')
clear.config(state='disable')
def remove_record():
if not tree.selection():
mb.showerror('Error!', 'Please select an item from the
database')
return
current_item = tree.focus()
values = tree.item(current_item)
selection = values["values"]
tree.delete(current_item)
clear_and_display()
def delete_inventory():
if mb.askyesno('Are you sure?', 'Are you sure you want to
delete the entire inventory?\n\nThis command cannot be reversed'):
tree.delete(*tree.get_children())
cursor.execute('DELETE FROM Library')
connector.commit()
else:
return
def change_availability():
global card_id, tree, connector
if not tree.selection():
mb.showerror('Error!', 'Please select a book from the
database')
return
current_item = tree.focus()
values = tree.item(current_item)
BK_id = values['values'][1]
BK_status = values["values"][3]
if BK_status == 'Issued':
surety = mb.askyesno('Is return confirmed?', 'Has the
book been returned to you?')
if surety:
clear_and_display()
# Variables
lf_bg = 'LightSkyBlue' # Left Frame Background Color
rtf_bg = 'DeepSkyBlue' # Right Top Frame Background Color
Label(root, text='LIBRARY MANAGEMENT SYSTEM', font=("Noto Sans CJK TC", 15, 'bold'),
bg=btn_hlb_bg, fg='White').pack(side=TOP, fill=X)
# StringVars
bk_status = StringVar()
bk_name = StringVar()
bk_id = StringVar()
author_name = StringVar()
card_id = StringVar()
# Frames
left_frame = Frame(root, bg=lf_bg)
left_frame.place(x=0, y=30, relwidth=0.3, relheight=0.96)
RB_frame = Frame(root)
RB_frame.place(relx=0.3, rely=0.24, relheight=0.785, relwidth=0.7)
# Left Frame
Label(left_frame, text='Book Name', bg=lf_bg, font=lbl_font).place(x=98, y=25)
Entry(left_frame, width=25, font=entry_font, text=bk_name).place(x=45, y=55)
tree.config(xscrollcommand=XScrollbar.set, yscrollcommand=YScrollbar.set)
1. Main Menu
4. Delete A Record ( select one record from database and click on delete book
records)
ENTER
5. Update Book Details ( select one record for edit than you can edit on main
menu)
6. Change Book Availability ( select of data for change , click change book
availability then enter the issuer’ id card id and ok )
Testing System testing is designed to uncover the weaknesses that were not foundin earlier test.
In the testing phase, the program is executed with the explicit intention of finding errors. This
includes forced system failures and validation of the system, as its user in the operational
environment will implement it. For this purpose, test cases are developed. When a new system
replaces the old one, suchas in the present case, the organization can extract data from the old
system to test them on the new. Such data usually exist in sufficient volume to provide
sample listings and they can create a realistic environment that ensures eventual system
success. Regardless of the source of test data, the programmers and analyst will eventually
conduct four different types of tests.
Unit testing focuses verification efforts on the smallest unit of the software design, the
module. This is also known as Module Testing. The modules are tested separately. This
testing is carried out during programming stage itself.
Validation Testing
Validation testing can be defined in many ways but a simple definition is that validation
succeeds when the software functions in a manner that can be reasonably expected by the
users. After validation test has been conducted one ofthe two possible conditions exists
1. The function or the performance characteristics confirm to specification and are accepted.
Output Testing
After performing the validation testing the next step is output testing of the proposed system
since no system is useful if it does not produce the required output in the specific format. The
outputs generated or displayed by the system under consideration are tested by asking the
users about the formats required by them.
User acceptance of a system is a key factor for the success of any system. The system under
consideration is tested for user acceptance by constantly keeping in touch with prospective
system users at the time development and making changeswhenever required.
System verification and validation is done to check the quality of the software insimulated and
live environment. A number of different transactions are used to perform verification.
Validation is the process of demonstrating that the implemented software does satisfy the
system requirements. One aspect ofsoftware validation is to statistically analyze the program
without resorting to actual execution. The system validation done in such-a-way that the
system response time will not cause any hardship to the user.
White box testing is a test case design method that uses the control structure of the procedural
design to derive test cases. Using white box testing methods, we can derive test cases that
❖ Guarantee that all independent paths within a module have been exercised at least once.
❖ Execute all loops at their boundaries and within their operational bounds.
Black box testing methods focus on the functional requirements if the software.That is, black
box testing enables us to derive sets of input conditions that will fully exercise all functional
requirements of the program. Black box testing attempts to find errors in following categories:
➢ Interface errors
➢ Performance errors
As now the project/software will work upon command prompt in future we will make GUI
(Graphical User Interface) or web-based software/system so that every user can access it very
easily. Student also be a user of this system. Performance will be improved day to day users
increment.In future we can convert it in android application (APP).
machine learning for predictive analytics, recommending books based on user preferences, or
2. Enhanced User Experience: Developing a user-friendly interface for both librarians and
patrons, making it intuitive and easily navigable. Introducing features like personalized
dashboards, easy search options, and mobile-friendly interfaces can significantly enhance user
satisfaction.
3. Mobile Application Development: Creating dedicated mobile apps for both Android and iOS
platforms to provide users with the flexibility to access library services on their smartphones or
tablets. This could include features like barcode scanning for book checkouts, push
audio books), inter-library loan management, or collaborative features like book clubs, forums,
5. Data Analytics and Reporting: Implementing robust analytics tools to gather insights into
user behavior, popular book genres, borrowing patterns, etc. This data can aid in making
sensitive user data and ensuring compliance with data privacy regulations such as GDPR,
HIPAA, etc.
7. API Integration and Interoperability: Integrating the library system with other educational
https://www.geeksforgeeks.org/python-dictionary/?ref=lbp
https://www.geeksforgeeks.org/python-oops-concepts/?ref=lbp
https://www.geeksforgeeks.org/constructors-in-python/?ref=lbp
https://www.javatpoint.com/python-lambda-functions
https://www.javatpoint.com/python-while-loop
https://www.javatpoint.com/python-mysql-database-connection
https://www.javatpoint.com/python-dictionary