Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

SubarnaDay PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Online Book Shop in PHP & MySQL

Submitted By-
SUBARNA DEY
Registration no- 161541810024
Roll no- 15499016006
MASTER DEGREE THESIS
A thesis submitted in partial fulfillment of the requirements for
the degree of MSC
In
Computer Science
Supervision Under
Subhajit Pal

Dinabandhu Andrews Institute of Technology and Management


MaulanaAbulKalam Azad University of Technology.
11th MAY, 2018

Online Book Shop Page 1


ACKNOWLEDGEMENT
I would like to express my deepest appreciation to all those who provided me the
possibility to complete this project. A special gratitude I give to my respected
guide ‘SUBHAJIT PAL’ department in computer science in DAITM under
MAKAUT, whose contribution in stimulating suggestions and encouragement
helped me to coordinate my project especially in writing this report.

Furthermore I would also like to acknowledge and thanks to the principle ma’am
‘SANJUKTA NANDY’, ‘PARAMITA RAY’,HOD of the computer science
department, all faculty members and staff for providing me all the facilities and for
their support to all activities, and gave the permission to use all required equipment
and the necessary materials to complete the Project.

A special thanks goes to my two friend Pratim Jana & Dipanjan Nandi, who help
me and gave suggestion about the task.

I would like to express my gratitude to my parents ‘DWARIKA NATH DEY’ and


‘KABITA DEY’ for their unbreakable believe, support and guidance.

Last but not the least I would like to thanks all my classmates of M.sc Computer
science batch 2016-2018 for their co-operation and support.

SUBARNA DEY

Online Book Shop Page 2


To whom at may concern
This is certified that the work entitled as
‘Online Book Shop in PHP & MySQL’

has been satisfactory complete by Subarna Dey (Registration no-161541810024


OF 2016-2017 Roll no-15499016006).It is a bonafide work carried out under my
supervision at DAITM Kolkata for partial fulfillment of Msc in computer science
during the academic year 2016-2018.

Project Guide
Subhajit Pal
(Assistant professor)
DAITM Kolkata

Forward by
Paramita Ray
(HOD of Computer science Dept)
DAITM Kolkata

Online Book Shop Page 3


CERTIFICATE AND APPROVAL
This is certified that the work entitled as ‘Online Book Shop’ has been satisfactory
complete by Subarna Dey (Registration no-161541810024 OF 2016-2017 Roll no-
15499016006).It is a confide work carried out under my supervision at DAITM
Kolkata for partial fulfillment of Msc in computer science during the academic
year 2016-2018.It is understood that by this approval the undersigned do not
necessarily endure or approve any statement made, opinion expressed or
conclusion drawn there in but approve for which it has been submitted.

Examiners

Signature of the Project Guide Signature of the Head of the


Department

Signature of the examiner

Online Book Shop Page 4


DECLARATION OF ORIGINALITY AND COMPLIANCE
OF ACADEMIC ETHICS

I hereby declare that this thesis contents original project work done by
me, as part of masters of computer science studies. All information in
this document has been obtained and presented in accordance with the
academic rules and ethical conduct.
I also declare that, as required by these rules and conduct I have fully
cited and referenced all the materials.

Subarna Dey
MSC (CS)
Registration no- 161541810024
Roll- 15499016006

Online Book Shop Page 5


TABLE OF CONTENT

Contents Page no.


1. Introduction 6
1.1. Purpose 6
1.2. Modules 7
1.3. Users 7
1.4. Hardware requirement 7
1.5. Software requirement 7
1.6. Advantages 8
1.7. Applications 8
2.0. Overall description 8
2.1. Administrator 8
3.0.Web development 9
4.0.What is PHP. 9
5.0.What is MySql database. 10
6.0. Integrating the Website and Database 11
7.0. The Shopping Cart Application 11
8.0. Project Design 12
9.0. Functional Decomposition Diagram 12-13
10.0. Data Flow Diagram (DFD) 14-15
11.0. Input & Output Snapshots 16-26
12.0. Limitations and Future Development 26
13.0. Conclusion 27
14.0. Links and source 28

Online Book Shop Page 6


1.0. Introduction
An online bookstore software projects that acts as a central database containing
various books in stock along with their title, author and cost. This project is a
website that acts as a central book store. This web project is developed using php
as the front end and sql as a back-end. The sql database stores various book
related details. A user visiting the website can see a wide range of books
arranged in respective categories. The user may select desired book and view its
price. The user may even search for specific books on the website. Once the user
selects a book , he then has to fill in a form and the book is booked for the user.
The software has the following three main components:-

1. Implement of new user to register and login.

2. Implement user to choose any book.

3. Implement the user to buy books.

The website will be implemented using PHP as the programming


language.MYSQL database wil be used to link database.

1.1. Purpose
For the project, we propose to build an online bookshop for People. The online
bookshop will contain stories, study material, any courses books like computer and
be available to everyone. Many students find textbooks too expensive to buy at
school bookstores and many courses only use the required textbooks a few days in
a semester. This becomes very wasteful and frustrating for students & others
people. This online bookstore provides a solution to this. It will provide a service
in which students can buy books online without any treble. There will be free
shipping. They do need to register with the site in order to books. Payment
information will be requested after adding any numbers of books in the cart.
.

Online Book Shop Page 7


1.2. Modules
The site will contain the following features:
 Registration / Login
 Add to Cart
 Searching for book
 Buy book
 Payment option

1.3. Users:
Register-The user needs to be registered in order to login.

Login: The users need to login in to get access to the system.

View product-Here the user can view different products and its details.

Search –The user can search product by name after which the system will evaluate
prices of the same product from different websites to give the user the best search
result.

1.4. Hardware Requirements:


 Processor – i3
 Hard Disk – 50 GB
 Memory – 1GB RAM
 Monitor

1.5. Software Requirement:

 Windows 7 or higher
 XAMMP control panel
 Note pade ++
 My SQL

Online Book Shop Page 8


1.6. Advantages:
 Customers can get their book delivered instead of actually going and buying
the book. They can make payment online itself.
 Managing of inventory in the shop for shopkeeper becomes easier as
customers are not visiting and ordering online.
 This system saves both time and travelling cost of customers.
 User can get to know different kinds of books that they were unaware of by
just searching in the system using keywords.

1.7. Applications:
 The system can be very well used by the book shopkeepers to expand their
customers.

2.0. OVERALL DESCRIPTION


This project designs an online bookstore provides a web-based interface. It is the
graphical user interface. It have a form for user to input query information to
search the database. The users interface then pass the input to the control function,
which implemented in php. The control function is designed to process the input
from the users interface, generate the searching query and then gets data from the
database and returns to the users interface. The control functions also have bridges
to search some external real online bookshops. It can generate the query based on
the user input and pass them to the commercial bookshop. The bridge can also
handle the response from the commercial bookshop and parse the useful
information and display to the user in HTML forms.

2.1. For Administrators

 Taking backup of the Database .


 Editing / Deleting / Creating the database .
 Changing the password .

Online Book Shop Page 9


3.0. What is web development.
Web development broadly refers to the tasks associated with developing
websites for hosting via intranet or internet. The web development process
includes web design, web content development, client-side/server-side scripting
and network security configuration, among other tasks. Web development is also
known as website development.

4.0. What is PHP.


PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open
source general-purpose scripting language that is especially suited for web
development and can be embedded into HTML.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>

<?php
echo "Hi, I'm a PHP script!";
?>

</body>
</html>

Advantages:
Stable: Since it is maintained by many developers, so when bugs are found, it can
be quickly fixed.

Easy to use: It uses C like syntax, so for those who are familiar with C, it’s very
easy for them to pick up and it is very easy to create website scripts.

Speed: It is relative fast since it uses much system resource.

Online Book Shop Page 10


5.0. What is MySql database.
In this project, MySQL is used as the backend database. MySQL is an open source
database management system. The features of MySQL are given below:
 MySQL is a relational database management system. A relational database
stores information in different tables, rather than in one giant table. These
tables can be referenced to each other, to access and maintain data easily.
 MySQL is open source database system. The database software can be used
and modify by anyone according to their needs. It is fast, reliable and easy to
use. To improve the performance.
 MySQL is multithreaded database engine. A multithreaded application
performs many tasks at the same time as if multiple instances of that
application were running simultaneously.
 In being multithreaded MySQL has many advantages. A separate thread
handles each incoming connection with an extra thread that is always
running to manage the connections. Multiple clients can perform read
operations simultaneously, but while writing, only hold up another client
that needs access to the data being updated. Even though the threads share
the same process space, they execute individually and because of this
separation, multiprocessor machines can spread the thread across many
CPUs as long as the host operating system supports multiple CPUs.
Multithreading is the key feature to support MySQL’s performance design
goals. It is the core feature around which MySQL is built.
 MySQL database is connected to JSP using an ODBC driver. Open
Database Connectivity (ODBC) is a widely accepted application-
programming interface (API) for database access. The ODBC driver is a
library that implements the functions supported by ODBC API. It processes
ODBC function calls, submits SQL requests to MySQL server, and returns
results back to the application. If necessary, the driver modifies an
application's request so that the request conforms to syntax supported by
MySQL.

Online Book Shop Page 11


6.0. Integrating the Website and Database
Customers ordering from an e-commerce website need to be able to get
information about a vendor’s products and services, ask questions, select items
they wish to purchase, and submit payment information. Vendors need to be able
to track customer inquiries and preferences and process their orders. So a well
organized database is essential for the development and maintenance of an e-
commerce site. In a static Web page, content is determined at the time when the
page is created. As users access a static page, the page always displays the same
information. Example of a static Web page is the page displaying company
information. In a dynamic Web page, content varies based on user input and data
received from external sources. We use the term “data-based Web pages” to refer
to dynamic Web pages deriving some or all of their content from data files or
databases. A data-based Web page is requested when a user clicks a hyperlink or
the submit button on a Web page form. If the request comes from clicking a
hyperlink, the link specifies either a Web server program or a Web page that calls a
Web server program. In some cases, the program performs a static query, such as
“Display all items from the Inventory”. Although this query requires no user input,
the results vary depending on when the query is made. If the request is generated
when the user clicks a form’s submit button, instead of a hyperlink, the Web server
program typically uses the form inputs to create a query. For example, the user
might select five books to be purchased and then submit the input to the Web
server program. The Web server program then services the order, generating a
dynamic Web page response to confirm the transaction. In either case, the Web
server is responsible for formatting the query results by adding HTML tags. The
Web server program then sends the program’s output back to the client’s browser
as a Web page.

7.0. The Shopping Cart Application

The objective of this application is to provide the user an online website where
they can buy books from the comfort of their home. A shopping cart is used for the
purpose. The user can select the desired books, place them in the shopping cart and
purchase them using a Credit Card. The user’s order will be shipped according to
the type of shipping selected at the time of placing the order.

Online Book Shop Page 12


8.0. Project Design

In order to design a web site, the relational database must be designed first.
Conceptual design can be divided into two parts: The data model and the process
model. The data model focuses on what data should be stored in the database while
the process model deals with how the data is processed. To put this in the context
of the relational database, the data model is used to design the relational tables.
The process model is used to design the queries that will access and perform
operations on those tables.

9.0. Functional Decomposition Diagram

A decomposition diagram shows a top-down functional decomposition of a system


and exposes the system's structure. The objective of the Functional Decomposition
is to break down a system step by step, beginning with the main function of a
system and continuing with the interim levels down to the level of elementary
functions. The diagram is the starting point for more detailed process diagrams,
such as data flow diagrams (DFD). shows the Functional Decomposition Diagram
for this project.

Online Book Shop Page 13


Online Book Shop Page 14
10.0. Data Flow Diagram (DFD)
Data Flow Diagrams show the flow of data from external entities into the system,
and from one process to another within the system. There are four symbols for
drawing a DFD:
1. Rectangles representing external entities, which are sources or
destinations of data.
2. Ellipses representing processes, which take data as input, validate and
process it and output it.
3. Arrows representing the data flows, which can either, be electronic data
or physical items.
4. Open-ended rectangles or a Disk symbol representing data stores,
including electronic stores such as databases or XML files and physical
stores such as filing cabinets or stacks of paper.

Online Book Shop Page 15


Online Book Shop Page 16
11.0. Input & Output Snapshots

Home page

Online Book Shop Page 17


Registration Page

Registration Form fill up

Online Book Shop Page 18


Successfully registered

Login to Continue

Online Book Shop Page 19


Login Page

Logged in

Online Book Shop Page 20


Books Categories

Select Your Choice

Online Book Shop Page 21


Book Category

Buy Book

Online Book Shop Page 22


Add to Cart

Calculation of book

Online Book Shop Page 23


Shipping Details

Shipping Form Fill up

Online Book Shop Page 24


Payment Option

Log Out

Online Book Shop Page 25


Contact Us

About Us

Online Book Shop Page 26


View Cart Option

12.0. Limitations and Future Development

There are some limitations for the current system to which solutions can be
provided as a future development:

1. The system is not configured for multi- users at this time. The concept
of transaction can be used to achieve this.
2. The Website is not accessible to everyone. It can be deployed on a
web server so that everybody who is connected to the Internet can use
it.
3. Credit Card validation is not done. Third party proprietary software
can be used for validation check.

As for other future developments, the following can be done:

1. The Administrator of the web site can be given more functionality,


like looking at a specific customer’s profile, the books that have to
be reordered, etc.
2. Multiple Shopping carts can be allowed.

Online Book Shop Page 27


13.0. Conclusion

The Internet has become a major resource in modern business, thus electronic
shopping has gained significance not only from the entrepreneur’s but also from
the customer’s point of view. For the entrepreneur, electronic shopping generates
new business opportunities and for the customer, it makes comparative shopping
possible. As per a survey, most consumers of online stores are impulsive and
usually make a decision to stay on a site within the first few seconds. “Website
design is like a shop interior. If the shop looks poor or like hundreds of other shops
the customer is most likely to skip to the other site”. Hence we have designed the
project to provide the user with easy navigation, retrieval of data and necessary
feedback as much as possible. In this project, the user is provided with an e-
commerce web site that can be used to buy books online. To implement this as a
web application we used PHP as the Technology. PHP (XAMPP) has several
advantages such as enhanced performance, scalability, built- in security and
simplicity. To build any web application using PHP we need a programming
language such as JAVA, HTML # and so on. JAVA SCRIPT was the language
used to build this application. PHP uses MySQL server to interact with the
database as it provides in-memory caching that eliminates the need to contact the
database server frequently and it can easily deploy and maintain an PHP
application. MySQL was used as back-end database since it is one of the most
popular open source databases, and it provides fast data access, easy installation
and simplicity.
A good shopping cart design must be accompanied with user-friendly shopping
cart application logic. It should be convenient for the customer to view the contents
of their cart and to be able to remove or add items to their cart. The shopping cart
application described in this project provides a number of features that are
designed to make the customer more comfortable. This project helps in
understanding the creation of an interactive web page and the technologies used to
implement it. The design of the project which includes Data Model and Process
Model illustrates how the database is built with different tables, how the data is
accessed and processed from the tables. The building of the project has given me a
precise knowledge about how PHP is used to develop a website, how it connects to
the database to access the data and how the data and web pages are modified to
provide the user with a shopping cart application.

Online Book Shop Page 28


14.0. Links & Source
 https://en.wikipedia.org/wiki/Bookselling
 https://www.techopedia.com/definition/23889/web-development
 http://php.net/manual/en/intro-whatis.php
 https://www.mysql.com/about/
 https://en.wikipedia.org/wiki/MySQL
 https://www.w3schools.com/php/php_mysql_intro.asp

Online Book Shop Page 29

You might also like