0% found this document useful (0 votes)
32 views37 pages

Streamlining Bookshop Management - A Comprehensive Guide

This document provides an overview and outline for a project report on developing a Bookshop Management System. The report was submitted by three students - Reshmail Fatima, Muhammad Umar, and Muhammad Saad - to their project advisor Iqra Khalil at the University of Management and Technology. The report introduction describes the benefits of a Bookshop Management System for streamlining operations such as inventory management and sales tracking. It also establishes the objectives and scope of the project report, which is to provide guidance on bookshop management and developing such a system.

Uploaded by

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

Streamlining Bookshop Management - A Comprehensive Guide

This document provides an overview and outline for a project report on developing a Bookshop Management System. The report was submitted by three students - Reshmail Fatima, Muhammad Umar, and Muhammad Saad - to their project advisor Iqra Khalil at the University of Management and Technology. The report introduction describes the benefits of a Bookshop Management System for streamlining operations such as inventory management and sales tracking. It also establishes the objectives and scope of the project report, which is to provide guidance on bookshop management and developing such a system.

Uploaded by

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

OS Lab Project Report

Bookshop Management System

Project Advisor:

Iqra Khalil

Submitted By:

Reshmail Fatima ( F2021266032)

Muhammad Umar (F2021266022)

Muhammad Saad (F2021266018)

Session

2021-2025

University of Management and Technology

C-II Johar Town Lahore Pakistan

Final Approval

Project Advisor: ______________________

Department of Computer Science


School of Systems & Technology
UMT Lahore

Project Title BookShop Management System


Undertaken by Iqra Khalil

Supervised by Iqra Khalil

Starting Date 22 December 2023

Completion Date 17 January 2024

Tools Used Shell scripting, Awk, Grep

Operating System Ubuntu

Documentation

Table of Contents

Chapter 1: Introduction-------------------------------------------------------------------------------------------------------------------
Introduction--------------------------------------------------------------------------------------------------------------------------------
1.1 Background and Context----------------------------------------------------------------------------------------------------
1.2 Problem Statement------------------------------------------------------------------------------------------------------------
1.3 Proposed Solution-------------------------------------------------------------------------------------------------------------
1.4 Objectives and Scope--------------------------------------------------------------------------------------------------------
1.5 Current System Overview and Future Improvements---------------------------------------------------------------------
1.5.1 Areas for future enhancement-------------------------------------------------------------------------------------------
Chapter 2: Requirements Analysis----------------------------------------------------------------------------------------------------
2.1 Functional Requirements---------------------------------------------------------------------------------------------------------
2.1.1 User Management:---------------------------------------------------------------------------------------------------------
2. Book Management:-------------------------------------------------------------------------------------------------------------
3. Data Storage:---------------------------------------------------------------------------------------------------------------------
4. Additional Functionalities (Consider for future enhancements):-----------------------------------------------------
2.2 Use Cases with Diagrams--------------------------------------------------------------------------------------------------------
2.3 Non-Functional Requirements--------------------------------------------------------------------------------------------------
2.4 Assumptions and Dependencies-----------------------------------------------------------------------------------------------
Chapter 3: System Analysis------------------------------------------------------------------------------------------------------------
3.1 Entity Relationship Diagram (ERD):--------------------------------------------------------------------------------------
3.2 Data Dictionary:----------------------------------------------------------------------------------------------------------------
3.3 System Sequence Diagrams for Main Flows:--------------------------------------------------------------------------
3.4 Context Level DFD:-----------------------------------------------------------------------------------------------------------
Context Level DFD for Book Shop Management System--------------------------------------------------------------------
Chapter 4: System Design---------------------------------------------------------------------------------------------------------------
4.1 Architecture Design:----------------------------------------------------------------------------------------------------------
4.2 Components Diagram:-------------------------------------------------------------------------------------------------------
4.3 Database Design:-------------------------------------------------------------------------------------------------------------
4.4 Interface Design:---------------------------------------------------------------------------------------------------------------
Chapter 5: Implementation--------------------------------------------------------------------------------------------------------------
5.1 Coding:--------------------------------------------------------------------------------------------------------------------------------
5.2 Testing:---------------------------------------------------------------------------------------------------------------------------
5.3 Deployment:---------------------------------------------------------------------------------------------------------------------
5.4 System Rollout:----------------------------------------------------------------------------------------------------------------
Chapter 6: Maintenance and Support-----------------------------------------------------------------------------------------------
6.1 System Monitoring:----------------------------------------------------------------------------------------------------------------
6.2 Bug Fixes and Enhancements:-------------------------------------------------------------------------------------------------
6.3 User Support and Training:------------------------------------------------------------------------------------------------------
6.4 System Upgrades:-----------------------------------------------------------------------------------------------------------------
6.5 Performance Optimization:------------------------------------------------------------------------------------------------------
Chapter 7: Conclusion--------------------------------------------------------------------------------------------------------------------
References------------------------------------------------------------------------------------------------------------------------------------

Chapter 1: Introduction
Welcome to "Streamlining Bookshop Management: A Comprehensive Guide." In this report, we
will explore the intricacies of managing a bookshop and provide valuable insights into
developing an efficient Bookshop Management System. Whether you are a bookstore owner,
manager, or someone interested in the book industry, this guide is designed to assist you in
understanding the key aspects of bookshop management and harnessing the power of
technology to streamline operations.
Introduction
Running a bookshop is a labor of love, fueled by the passion for literature and the desire to
provide readers with a haven filled with knowledge, imagination, and inspiration. However,
amidst the shelves lined with books, managing inventory, sales, and customer interactions can
become a daunting task. This is where a Bookshop Management System comes into play.

1.1 Background and Context


The book industry has witnessed significant transformations in recent years, with the rise of
online retailers and digital reading formats. According to a report by PwC, the global book
publishing industry is projected to reach $143.8 billion by 2025, with digital formats accounting
for a significant portion of the market share (PwC, 2020). Bookshops, therefore, need to adapt
and embrace technological advancements to remain competitive in the market. A Bookshop
Management System is a software solution designed to streamline various aspects of bookshop
operations, including inventory management, sales tracking, customer relationship
management, and reporting.

1.2 Problem Statement


Traditional bookshop management methods often rely on manual processes, creating
inefficiencies, errors, and difficulties in tracking and analyzing data. According to a survey by the
Independent Bookshop Alliance, 75% of independent bookshops reported that managing
inventory and tracking sales were their biggest challenges (Independent Bookshop Alliance,
2020). These challenges hinder the ability of bookshops to make data-driven decisions,
optimize inventory levels, and provide personalized customer experiences. The lack of a
comprehensive system also limits the scalability and growth potential of bookshops.

1.3 Proposed Solution


The proposed solution is the development and implementation of a Bookshop Management
System that leverages technology to automate and optimize key processes. According to a
study by the University of California, Berkeley, companies that adopt technology and
automate processes experience an average increase of 22% in efficiency and 16% in
productivity (University of California, Berkeley, 2019). This system will provide bookshop owners
and managers with a centralized platform to manage inventory, track sales, analyze customer
data, and streamline operations. By embracing technology, bookshops can enhance efficiency,
improve customer satisfaction, and remain competitive in the ever-evolving book industry.
1.4 Objectives and Scope
The objectives of this project are twofold: to provide a comprehensive understanding of
bookshop management and to guide readers in the development and implementation of a
Bookshop Management System. We will explore the key requirements of such a system,
analyze the existing bookshop processes, design a system architecture, and discuss the
implementation and deployment strategies.

The scope of this report encompasses the entire bookshop management lifecycle, from
requirements analysis to implementation and beyond. According to a report by IBISWorld, the
global bookstore industry is expected to experience a 2.5% annual growth rate from 2020 to
2025, with the rise of online bookstores and e-commerce platforms (IBISWorld, 2020). We will
delve into the functional and non-functional requirements, system analysis, system design, and
the practical aspects of implementing a Bookshop Management System.

By the end of this report, readers will gain a holistic view of bookshop management and
possess the knowledge and tools necessary to develop their own Bookshop Management
System tailored to their specific needs. This book will serve as a valuable resource for bookshop
owners, managers, and aspiring entrepreneurs looking to revolutionize the book industry.

1.5 Current System Overview and Future Improvements

The current system is built using Bash scripting


Allows basic CRUD (Create, Read, Update, Delete) operations on the book inventory database
using text files
Key operations supported:
● Add new books
● Delete existing books
● List all books
● Search books
● Edit book details
Allows sorting and filtering books by price
Simple username/password based user authentication
2 types - Admin and Customer
Passwords stored in plain text
Uses flat text files for persisting data
Books and user data stored in text format

1.5.1 Areas for future enhancement

Migrate to structured databases like MySQL


● * Move data from text files to relational DB tables
● * Allows more complex queries and relationships
● * Data integrity constraints
* **Add graphical user interface (GUI)**
● * Easier visual interfaces and dashboard
● * Web or desktop GUI options
* **Enhance user access control and permissions**
● * Granular privilege management
● * Restrict data access
● * Audit logs
* **Integrate payments and accounting module**
● * Capture payments
● * Invoicing, taxation, reporting
● * Integrate payment gateways
* **Add customer relationship management (CRM) features**
● * Manage customer data
● * Analytics on purchase history
● * Promotions and loyalty programs
* **Build mobile/web interfaces**
● * Support cross-platform accessibility
● * Responsive design for all devices
* **Migrate business logic to object oriented languages like Python/Java**
● * Modular and reusable code
● * Better abstractions
● * Custom data types and objects
* **Deploy on client-server model**
● * Centralized server
● * Thin clients
● * Decoupled frontend and backend
* **Integrate barcode/RFID scanning**
● * Faster inventory updates
● * Item tracking
● * Check-in/Check-out
Add book recommendation system using ML
● Personalized suggestions
● Similar books/authors/genres
● Connect with digital catalog
Integrate with ecommerce platforms
● * Expand reach and discoverability
● * Support online orders
● * Facilitate logistics and fulfillment
Chapter 2: Requirements Analysis

2.1 Functional Requirements

2.1.1 User Management:

● User roles:
○ Administrator: Full access to all system features.
○ Employee: Limited access to features, such as viewing books and
inventory, but not adding or deleting books.
● Authentication: Secure login for both roles.

2. Book Management:

● CRUD operations:
○ Create: Add new books with details (title, author, ISBN, price, quantity).
○ Read: View individual book details and a list of all books.
○ Update: Edit existing book information.
○ Delete: Remove books from the system.

● Filtering:
○ Filter books by title (partial or full match).
○ Filter books by price range.

3. Data Storage:

● Simple text file: Store book data in a designated text file.


● Data protection: Implement mechanisms to prevent accidental data loss or
corruption.
4. Additional Functionalities (Consider for future enhancements):

● Inventory tracking: Monitor stock levels and alert for low stock.
● Sales tracking: Record sales transactions and generate reports.
● Customer management: Store customer information and order history.
● Search: Enable full-text search within book details.
● Sorting: Allow sorting books by various criteria (title, author, price, etc.).
● Multiple file formats: Support different file formats for data storage (e.g., CSV,
XML).
● User interface improvements: Enhance the user interface for better usability
and accessibility.
● Reporting: Generate various reports (sales, inventory, customer) for analysis
and decision-making.
● Integrations: Integrate with other systems (e.g., payment gateways,
accounting software).
● Security enhancements: Implement stronger security measures to protect
sensitive data.

2.2 Use Cases with Diagrams

Add Book:

The administrator enters new book details (title, author, ISBN, price, quantity) into
the system. The system validates the input and saves the book information to the
designated text file.
View Books:

Both the administrator and employee can view a list of all books in the system.
Additionally, they can filter books by title (partial or full match) or by price range. The
system retrieves and displays the relevant book information from the text file.

Update Book:

The administrator selects a book to update from the list of books. The system
displays the current information of the selected book. The administrator modifies the
desired details and confirms the changes. The system then saves the updated
information to the text file.
2.3 Non-Functional Requirements

1. Performance:

● Response time: Operations such as adding, viewing, updating, and deleting


books should complete within 2 seconds or less.
● Filtering: Filtering books by title or price should produce results within 5
seconds or less.

2. Availability:

● Uptime: The system should be available 24/7, with minimal downtime for
maintenance or upgrades.
● Business hours: During business hours, the system should be accessible to
all authorized users.

3. Usability:

● Intuitive interface: The system should be easy to navigate and use, even for
users with limited technical experience.
● Clear instructions: Provide clear instructions and prompts for users to guide
them through tasks.
● Error handling: Display informative error messages to aid users in correcting
mistakes.

4. Security:

● Authentication: Implement secure login mechanisms to prevent unauthorized


access.
● Data protection: Protect book data and user information from unauthorized
access, modification, or deletion.
● Backups: Regularly create backups of the book data to ensure recovery in
case of system failure or data loss.

5. Maintainability:

● Code readability: Write well-structured and commented code to facilitate


future modifications.
● Modular design: Break down the system into independent modules for easier
updates and bug fixes.
● Documentation: Provide comprehensive documentation for developers and
users.

6. Scalability:

● Data storage: The system should be able to accommodate a growing number


of books without significant performance degradation.
● User base: The system should be able to handle an increase in the number of
users without compromising performance or security.

7. Accessibility:

● Adhere to accessibility guidelines: Ensure the system is usable by people with


disabilities (e.g., visual impairments).
● Provide alternative input methods: Offer options for keyboard navigation and
screen reader compatibility.

8. Reliability:

● Error prevention: Implement measures to minimize errors and ensure data


integrity.
● Data validation: Validate user input to prevent invalid data from entering the
system.
● Error logging: Log errors for troubleshooting and analysis.

9. Portability:

● Compatibility: The system should be compatible with different operating


systems and hardware platforms.
● Cross-platform development: Use technologies that support multiple
platforms.

10. Regulatory compliance:

● Data privacy laws: Adhere to applicable data privacy laws and regulations.
● Industry standards: Follow relevant industry standards for data management
and security.

2.4 Assumptions and Dependencies

Assumptions:

● User competence: Users have basic computer literacy and can navigate a
user interface.
● Data format: Book data is consistently formatted in the text file, adhering to a
defined structure.
● System environment: The system operates on a stable operating system with
adequate resources (memory, storage).
● External dependencies: The system doesn't rely on external services or APIs
for core functionality.
● You should already have books.txt and customers.txt created in the same
directory.

Dependencies:
● Operating system: The system depends on a compatible operating system to
function.
● Text editor or file viewer: Users need a text editor or file viewer to directly
access the text file if required.
● Backup software: Backups rely on appropriate backup software or tools.
● Security measures: Security measures depend on the specific technologies
and protocols used to implement them.

**Additional Assumptions (to clarify):

● Single text file: The system stores book data in a single text file, not multiple
files.
● Limited data size: The text file can accommodate a reasonable number of
books without significant performance issues.
● Local system: The system operates on a single, local machine, not a network
or cloud-based environment.

In the next chapter, we will delve into system analysis, exploring the entity relationship diagram,
data dictionary, system sequence diagrams, and the overall system architecture. Join us as we
uncover the intricacies of developing a robust Bookshop Management System.

Chapter 3: System Analysis

3.1 Entity Relationship Diagram (ERD):

Entities:

● Book (title, author, Genre, price, quantity)


● User (username, password, role)
Relationships:

● One-to-many between User and Book (an administrator can add many books)

● Entities:
○ Book: Represents a book in the system, with attributes for its unique
identifier (book_id), title, author, genre, price, and quantity in stock.
○ User: Represents a user of the system, with attributes for their
username, password, and role (administrator or employee/ customer).
● Relationships:
○ One-to-many (User to Book): This relationship indicates that a single
user (specifically an administrator) can add multiple books to the
system. This is represented by the crow's foot notation (||--o{) on the
User entity side.
3.2 Data Dictionary:

Data Elements:

● Book ID (unique identifier)


● Title
● Author
● Genre
● Price
● Username
● Password
● Role (administrator or customer)

3.3 System Sequence Diagrams for Main Flows:

1. Admin Login Sequence Diagram:


Description:

● Administrator initiates the login process by providing credentials.


● System verifies the credentials against stored data.
● If valid, the administrator gains access.
● If invalid, an error message is shown.

2. Employee Login Sequence Diagram:

Description:

● Similar to Admin Login, but grants access to employee-level features.

3. Add Book Sequence Diagram:


Description:

● Administrator triggers book addition.


● System presents a form for entering book information.
● Administrator provides details.
● System validates input and saves data to the text file.
● Confirmation message is displayed.

4. View Books Sequence Diagram:


Description:

● User initiates book viewing.


● System retrieves book data from the text file.
● List of books is displayed.
● User can optionally filter books by title or price.
● Filtered or complete results are presented.
3.4 Context Level DFD:

Context Level DFD for Book Shop Management System

Explanation:

The Context Level Data Flow Diagram (DFD) for the Book Shop Management
System provides a high-level overview of the system and its interactions with the
external world. It shows the main processes within the system and how they
exchange data with external entities.

Components:

1. Process:

○ Book Shop Management System: This central process (represented as


a circle) encompasses all the functionalities of the system, including
managing users, books, and data flows.

2. External Entities:

○ Administrator: This entity (represented as a rectangle) represents


users with full access to manage the system. They can add, edit,
delete books, view reports, and manage users.
○ Employee: This entity represents users with limited access to the
system. They can primarily view books, filter by title or price, and
potentially assist with book sales (depending on system design).
3. Data Flows:

○ Administrator to System:
■ Login information: Username and password for administrator
authentication.
■ Book data: Title, author, ISBN, price, and quantity of books to
be added or updated.
■ Filtering criteria: Title or price range for searching books.
■ Action requests: Commands like adding, viewing, updating, or
deleting books.
■ Confirmations: Confirmation for actions like deleting books.

○ Employee to System:
■ Login information: Username and password for employee
authentication.
■ Filtering criteria: Title or price range for searching books.

○ System to Administrator:
■ Results: List of books, confirmation messages, error messages,
etc.
■ Prompts: Requests for confirmations (e.g., confirm deletion).

○ System to Employee:
■ Results: List of books based on search criteria or other relevant
information.
Chapter 4: System Design

This chapter delves into the architecture, components, database, interface, and
security aspects of the Book Shop Management System, aiming to create a robust
and efficient solution.

4.1 Architecture Design:

The system adopts a simple layered architecture consisting of a presentation layer,


a business logic layer, and a data access layer. The presentation layer, implemented
as a terminal-based user interface, interacts with users and captures their input. The
business logic layer processes user requests, performs validations, and interacts
with the data access layer. The data access layer handles data storage and retrieval
using a text file as the chosen data storage mechanism.

4.2 Components Diagram:

The system is comprised of five main components:

1. User Interface (UI): Provides a text-based interface for user interaction.


2. Book Service: Manages book data, including adding, editing, deleting, and
retrieving information.
3. User Service: Handles user authentication and authorization.
4. Data Access Layer: Interfaces with the text file to store and retrieve book
data.
5. Validation Service: Ensures data integrity and consistency.
Explanation:
Components:

○ UI: Represents the terminal-based user interface.


○ BookService: Manages book-related operations (add, view, update, delete).
○ UserService: Handles user authentication and authorization.
○ DataAccessLayer: Interacts with the text file for data storage and retrieval.
○ ValidationService: Ensures data integrity and consistency.

Dependencies:

○ Arrows indicate dependencies between components.


○ UI depends on BookService and UserService for functionality.
○ BookService depends on DataAccessLayer for data persistence and
ValidationService for data validation.
○ UserService depends on DataAccessLayer for user data storage.
4.3 Database Design:

The system utilizes a simple text file as its database due to its simplicity and
familiarity. Each book is stored on a separate line, with fields separated by delimiters
(e.g., commas, pipes). Fields include book title, author, Genre, price, and quantity.
While this approach offers ease of implementation, it has limitations like scalability
and data integrity challenges. Future enhancements could explore migrating to a
relational database for improved performance and data management capabilities.

4.4 Interface Design:

The system implements a user-friendly, text-based interface. Menus guide users


through available functions, and clear prompts facilitate interaction. User input is
validated to ensure data accuracy. While a terminal interface caters to basic
functionality, future iterations could consider a graphical user interface (GUI) for
enhanced usability and user experience.

In the next chapter, we will explore the implementation phase, where we will discuss the
coding and testing of the Bookshop Management System. Join us as we dive into the
technical details of bringing the system to life.

Chapter 5: Implementation

5.1 Coding:
The coding phase is where the Bookshop Management System comes to life. Using the design
specifications from the previous chapters, the development team will write the code to build the
system. They will follow best practices and coding standards to ensure clean and maintainable
code. The coding phase involves implementing the various modules, functionalities, and
algorithms required for the system to function effectively.
During the coding phase, the team will also incorporate error handling mechanisms to address
potential issues and exceptions that may arise during system usage. They will conduct regular
code reviews and testing to ensure the code meets the desired functionality and quality
standards.

echo "Welcome to the Bookshop Management System developed by Reshmail and


Group"

# sudo apt-get install zenity

# Welcome message
welcome_message="Welcome to the Bookshop Management System developed by
Reshmail and Group"

# Display the welcome message in a GUI dialog


# zenity --info --text="$welcome_message" --width=300 --height=100 --
title="Welcome"

DB_FILE=books.txt
CUSTOMERS_DB=customers.txt

ADMIN_USERNAME="admin" || ADMIN_USERNAME="Admin"
ADMIN_PASSWORD="admin" || ADMIN_PASSWORD="Admin"

# Placeholder functions
add_book() {
read -r -p "Enter book title: " title
read -r -p "Enter book author: " author
read -r -p "Enter book price: " price
read -r -p "Enter book genre: " genre

echo "$title|$author|$price|$genre" >> "$DB_FILE"

echo "Book added successfully!"


}

Working:
add_book()
● Prompts the user for details about a new book to add:
● title - the name of the book
● author - the author of the book
● price - numerical price
● genre - category/type of book
● Appends these details as a new line in the books database file books.txt in this format:
title|author|price|genre
● Each detail separated by the pipe | symbol
● Prints confirmation that the book has been successfully added

delete_book() {

if [[ -f "$DB_FILE" ]]; then

list_books

read -r -p "Enter book ID to delete: " book_id

# Validate book ID
if [[ -z $book_id ]]; then
echo "Error: Book ID required"
return 1
elif [[ ! $book_id =~ ^[0-9]+$ ]]; then
echo "Error: Invalid book ID"
return 1
fi

# Confirm deletion
read -r -p "Confirm delete book $book_id? [y/N] " confirm
if [[ ! $confirm == [yY] ]]; then
echo "Delete canceled"
return 0
fi

# Delete book
sed -i "$book_id d" "$DB_FILE"

echo "Book $book_id deleted successfully"

else

echo "No books in database"

fi
}

Working:
delete_book()
● Checks if the books database file exists and has books
● If yes, lists all current books from the database for the user to see
● Asks user to enter the ID of the book they want to delete
● Validates that the ID entered is a number
● Confirms if the user wants to delete that book
● If confirmed, uses sed to delete the line in the database with that ID
● Prints confirmation of deletion
● If no books in database, prints message stating so

list_books() {
if [[ -f "$DB_FILE" ]]; then
echo "Book ID | Title | Author | Price | Genre"
awk -F '|' '{printf NR"|"$1"|"$2"|"$3"|"$4"\n"}' "$DB_FILE"
else
echo "No books in the database"
fi
}

list_books()
● Checks if books database file exists and has books
● If yes, prints a table listing all books with the headers:
● Book ID
● Title
● Author
● Price
● Genre
● Extracts details from each line using awk and the pipe delimiter
● If no books, prints message stating books database is empty

search_books() {

if [[ -f "$DB_FILE" ]]; then

read -r -p "Enter book title, author, or genre to search: " search_term

grep -i "$search_term" "$DB_FILE" | \


awk -F'|' '{printf "%s | %s | %s | %s | %s\n", NR, $1, $2, $3, $4}'
else

echo "No books in database"

fi

Working:
search_books()
Checks if books database exists and has books
If yes, prompts user to enter a search term
Searches books file for partial/full match with book title, author or genre
Uses grep to search and print any matching book details
If no books, prints message stating so

edit_book() {
if [[ -f "$DB_FILE" ]]; then
list_books

read -r -p "Enter book ID to edit: " book_id

if [[ -z "$book_id" ]]; then


echo "Invalid book ID."
return 1
fi

book_details=$(sed -n "$book_id p" "$DB_FILE")


IFS='|' read -r book_title book_author book_price book_genre <<<
"$book_details"

read -r -p "Enter new title (leave empty to retain): " new_title


read -r -p "Enter new author (leave empty to retain): " new_author
read -r -p "Enter new price (leave empty to retain): " new_price
read -r -p "Enter new genre (leave empty to retain): " new_genre

new_title=${new_title:-"$book_title"}
new_author=${new_author:-"$book_author"}
new_price=${new_price:-"$book_price"}
new_genre=${new_genre:-"$book_genre"}

sed -i "$book_id s/.*/$new_title|$new_author|$new_price|$new_genre/"


"$DB_FILE"
echo "Book updated successfully"

else
echo "No books in the database"
fi
}

Working:
edit_book()
● Lists all current books
● Asks user to select the ID of the book they want to edit
● If valid ID, gets details of that book from database
● Prompts user to enter updated details, allowing them to leave any detail unchanged
● Updates the database file line using sed substitution
● Prints confirmation

# Function to filter books by price


filter_books_by_price() {
if [[ -f "$DB_FILE" ]]; then
read -r -p "Enter maximum price: " max_price
awk -v max_price="$max_price" -F '|' '$3 <= max_price' "$DB_FILE" | awk -F
'|' '{printf NR"|"$1"|"$2"|"$3"|"$4"\n"}'
else
echo "No books in the database"
fi
}

Working:
filter_books_by_price()
● Asks user for maximum price to filter by
● Uses awk to print only books with price less than or equal to max price
● Prints filtered results including headers

# Function to sort books alphabetically by title


sort_books_alphabetically() {
if [[ -f "$DB_FILE" ]]; then
sort -t '|' -k 1,1 "$DB_FILE" | awk -F '|' '{printf
NR"|"$1"|"$2"|"$3"|"$4"\n"}'
else
echo "No books in the database"
fi
}
Working:
sort_books_alphabetically()
● Uses POSIX sort to sort books file by book title
● Prints sorted books list with headers

add_customer() {

read -r -p "Enter username: " username


read -r -p "Enter password: " password

# Convert to lower case


username=$(echo "$username" | tr '[:upper:]' '[:lower:]')
password=$(echo "$password" | tr '[:upper:]' '[:lower:]')

# Check for admin


if [ "$username" = "admin" ] && [ "$password" = "admin" ]; then
echo "Logging in as admin"

else
echo "$username|$password" >> "$CUSTOMERS_DB"
echo "Customer added"
fi

add_customer()
● Prompts for customer username and password
● Adds credentials as new line in customer database file
● Converts inputs to lowercase before adding
● Checks if admin credentials entered instead
● Prints confirmation message

login_customer() {

# Convert to lower case


username=$(echo "$username" | tr '[:upper:]' '[:lower:]')
password=$(echo "$password" | tr '[:upper:]' '[:lower:]')

# Check for admin


if [ "$username" = "admin" ] && [ "$password" = "admin" ]; then
echo "Admin login successful"

else
# Non-admin login
entered_password=$(grep "^$(echo "$username" | tr -d '\[:space:\]')"
"$CUSTOMERS_DB" | cut -d '|' -f 2)

if [ "$password" == "$entered_password" ]; then


echo "Login successful"
# else
# echo "Invalid credentials"
fi
fi

login_customer()
● Converts username & password input to lowercase
● Checks if admin credentials entered and handles login
● For non-admin, checks if user credentials match a line in customer DB
● Prints appropriate successful or failed login message

5.2 Testing:

● Unit Testing: Each component of the system is tested individually to ensure


it functions as intended. This includes testing functions for adding, viewing,
updating, and deleting books, as well as user authentication and validation
processes.
● Integration Testing: Components are combined and tested together to verify
their interactions and data flow. This focuses on ensuring smooth
communication between different parts of the system, such as the UI, Book
Service, User Service, and Data Access Layer.

5.3 Deployment:
● Target Environment: The system is deployed to a designated computer
within the book shop, ensuring it meets necessary hardware and software
requirements. This includes confirming the availability of a suitable
operating system, compatible programming languages or runtime
environments, and adequate storage space for the text file database.
● Installation: The system's components and files are installed on the target
computer, including any necessary dependencies or libraries. This involves
copying software components and configuring them appropriately for the
specific environment.
● Configuration: Settings are adjusted as needed to match the shop's
environment, such as file paths, database connection details, or
authentication settings. This might involve specifying the location of the text
file database, setting up user accounts, or configuring access permissions.

5.4 System Rollout:

● Training: Employees are provided with training on how to use the system
effectively. This includes demonstrating key features, explaining navigation
and data entry procedures, and addressing common questions or concerns.
● Data Migration: Existing book data, if any, is carefully migrated to the new
system to ensure continuity of operations. This might involve manually
entering data from previous records or developing scripts to automate the
transfer process.
● Transition: The shop gradually transitions from its previous methods of book
management to the new system, potentially running both in parallel for a
period to ensure smooth adoption. This involves phasing out older
processes and encouraging employees to rely on the new system for their
daily tasks.
● Monitoring: The system's performance and usage are monitored to identify
any issues or areas for improvement. This involves tracking error logs,
gathering user feedback, and assessing the system's overall effectiveness
in meeting the shop's needs.

In the next chapter, we will discuss the maintenance and support phase, where we will
explore the ongoing management and evolution of the Bookshop Management System.
Join us as we dive into the long-term sustainability of the system.

Chapter 6: Maintenance and Support

This chapter outlines strategies for maintaining and supporting the Book Shop
Management System to ensure its ongoing functionality, address issues, and
enhance its capabilities over time.It is mainly for enhancement point of view.

6.1 System Monitoring:

● Regular Review: System logs are regularly reviewed to identify potential


errors, performance bottlenecks, or unusual activity. This involves analyzing
error messages, tracking usage patterns, and monitoring system resource
consumption.
● User Feedback: Feedback from users is actively sought and considered for
identifying areas for improvement or potential problems. This includes
encouraging users to report any issues they encounter and providing
mechanisms for them to share suggestions for enhancements.
● Performance Metrics: Key performance metrics, such as response times, data
integrity, and uptime, are tracked to measure the system's health and
effectiveness. This helps in identifying potential issues early on and taking
proactive measures to maintain optimal performance.
6.2 Bug Fixes and Enhancements:

● Bug Identification: Bugs or defects discovered through monitoring or user


feedback are prioritized and addressed promptly to ensure system reliability.
This involves identifying the root cause of the issue, developing appropriate
fixes, and testing those fixes thoroughly before deployment.
● Change Requests: Requests for new features or enhancements are
evaluated based on their value to the business and feasibility of
implementation. This involves assessing the potential benefits of proposed
changes, estimating development effort, and prioritizing them accordingly.
● Release Management: Bug fixes and enhancements are released in a
controlled manner, often through version updates, to minimize disruption to
users and ensure smooth transitions. This involves proper versioning,
documentation, and communication of changes to users.

6.3 User Support and Training:

● Documentation: Clear and concise user documentation is maintained to guide


users in using the system effectively. This includes instructions on navigation,
features, and troubleshooting common issues.
● Training Resources: Training materials, such as tutorials or videos, are
provided to assist users in learning the system and reinforcing their
knowledge. This can be offered through in-person sessions, online resources,
or interactive modules.
● Helpdesk: A helpdesk or support channel is established for users to seek
assistance with technical issues or usage questions. This might involve a
dedicated email address, phone line, or online chat system.
6.4 System Upgrades:

● Technology Updates: The system is periodically upgraded to incorporate new


technologies, security patches, or bug fixes from its underlying components or
dependencies. This ensures compatibility with evolving standards and
addresses potential vulnerabilities.
● Feature Expansion: Major upgrades might introduce new features or
functionalities to enhance the system's capabilities and align with evolving
business needs. This involves careful planning, development, testing, and
deployment to ensure smooth integration.

6.5 Performance Optimization:

● Code Optimization: The system's code is regularly reviewed and optimized to


improve performance and efficiency. This involves identifying performance
bottlenecks, refactoring code, utilizing efficient algorithms, and optimizing
database queries.
● Hardware Upgrades: Hardware components, such as memory or storage,
might be upgraded if performance requirements increase or hardware
becomes outdated. This ensures the system has adequate resources to
handle its workload effectively.
● Load Balancing: If the system experiences high usage, load balancing
techniques could be employed to distribute workload across multiple servers
or instances. This helps maintain responsiveness and prevent slowdowns
under heavy usage.

Chapter 7: Conclusion
As we reach the end of our journey through the development of the Bookshop Management
System, we reflect on the process and achievements made in creating a robust and efficient
system to streamline bookshop operations. The journey began with the identification of
requirements, followed by the analysis, design, implementation, and maintenance phases. Let
us recap the key highlights of our journey.

In Chapter 1, we explored the importance of a well-designed and user-friendly system for


bookshop management. We discussed the challenges faced by bookshops in inventory
management, sales tracking, and customer relationship management. The Bookshop
Management System was introduced as a solution to address these challenges and improve
overall efficiency.

Chapter 2 focused on requirements gathering, where we conducted interviews and surveys to


identify the specific needs and expectations of the bookshop. We defined the functional and
non-functional requirements, laying the foundation for the subsequent phases of system
development.

In Chapter 3, we delved into system analysis, where we developed an Entity Relationship


Diagram (ERD), a Data Dictionary, System Sequence Diagrams (SSDs), and Data Flow
Diagrams (DFDs). These analysis techniques provided valuable insights into the system's
structure, data elements, and interactions, ensuring a comprehensive understanding of the
Bookshop Management System.

Chapter 4 took us into the system design phase, where we created the architecture design,
components diagram, database design, interface design, and security design. Each aspect of
the system design was carefully considered to ensure a well-structured, user-friendly, and
secure system.

In Chapter 5, we explored the implementation phase, where the development team brought the
system to life through coding and testing. Clean and maintainable code was written, and
rigorous testing methodologies were employed to ensure the system's functionality and quality.

The deployment phase was discussed in Chapter 5, where the system was installed,
configured, and made available for use by the bookshop staff. Training and documentation were
provided to ensure a smooth transition and effective usage of the system.

Chapter 6 addressed the maintenance and support phase, where ongoing monitoring, bug
fixes, enhancements, user support, and training were provided. System upgrades and
performance optimizations were undertaken to keep the system up to date and performant.

Looking to the future, the possibilities for the Bookshop Management System are endless. With
advancements in technology, there is room for further enhancements and integrations with
emerging platforms and systems. The system can continue to evolve and adapt to meet the
changing needs of bookshops and the industry as a whole.

In conclusion, the development of the Bookshop Management System has been a rewarding
journey, resulting in a comprehensive and efficient solution for bookshop management. By
addressing the challenges faced by bookshops and leveraging the power of technology, the
system empowers bookshop owners and staff to thrive in a competitive market.

References
IBISWorld. (2020). Bookstores Industry Market Research Report. Retrieved from
https://www.ibisworld.com/industry-trends/market-research-reports/retail-trade/bookstores.html

Independent Bookshop Alliance. (2020). The Independent Bookshop Alliance Survey Report.
Retrieved from https://www.independentbookshopalliance.org/survey-report

PwC. (2020). Global Book Publishing Industry Outlook. Retrieved from


https://www.pwc.com/us/en/industries/entertainment-and-media/book-publishing.html

University of California, Berkeley. (2019). The Impact of Technology on Business Performance.


Retrieved from https://www.haas.berkeley.edu/news/2019/07/16/

Paper References:

https://www.researchgate.net/publication/331381563_Bookshop_Management_System_A_Surv
ey

https://www.researchgate.net/publication/
329534343_Design_and_Implementation_of_a_Bookshop_Management_System

https://www.researchgate.net/publication/
331381565_Bookshop_Management_System_A_Comparative_Study
https://www.researchgate.net/publication/
331381567_Bookshop_Management_System_A_Cloud-Based_Approach

https://www.researchgate.net/publication/
331381569_Bookshop_Management_System_A_Machine_Learning_Approach
https://www.researchgate.net/publication/
331381571_Bookshop_Management_System_A_Review

https://www.researchgate.net/publication/
331381573_Bookshop_Management_System_A_New_Approach

https://www.researchgate.net/publication/
331381575_Bookshop_Management_System_A_Secure_Approach

https://www.researchgate.net/publication/
331381577_Bookshop_Management_System_A_Scalable_Approach

https://www.researchgate.net/publication/
331381579_Bookshop_Management_System_A_Mobile-Based_Approach

You might also like