Sunteți pe pagina 1din 26

ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 1
INTRODUCTION

1.1 Database management system (DBMS):


A database management system (DBMS) is system software for creating and managing
databases. The DBMS provides users and programmers with a systematic way to create,
retrieve, update and manage data.

A DBMS makes it possible for end users to create, read, update and delete data in a
database. The DBMS essentially serves as interface between the database and end users or
application programs, ensuring that data is consistently organized and remains easily
accessible.

The DBMS manages three important things: the data, the database engine that
allows data to be accessed, locked and modified – and the database schema, which defines the
database’s logical structure. These three foundational elements help provide concurrency,
security, data integrity and uniform administration procedures. Typical database administration
tasks are supported by the DBMS include change management, performance monitoring/tuning
and backup and recovery. Many database management systems are also responsible for
automated rollbacks, restarts and recovery as well as the logging and auditing of activity.

The DBMS perhaps most useful for providing a centralized view of data that can be
accessed by multiple users, for multiple locations, in a controlled manner. A DBMS can limit
what data the end user sees, as well as how that end user can view the data, providing may
views of single database schema. End users can software programs are free from having to
understand where the data is physically located or on what type of storage media it resides
because the DBMS handles all requests.

VKIT, Dept. of CSE Page 1


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Fig 1.1 Facilities of a DBMS

1.2 Structured Query Language (SQL):

SQL is a domain-specific Language used in programming and designed for managing


data held in a relational database management system(RDBMS), or for stream processing in a
relational data stream management system (RDBMS). In comparison to older read/write APIs
like SAM or VSAM, SQL offers two main advantages: first, it introduced the concept of
accessing many records with one single command; and second, it eliminates the need to specify
how to reach a record, e.g. with or without an index.

Originally based upon relational algebra and tuple relational calculus, SQL consists of a
data definition language, data manipulation language, and data control language.

The scope of SQL includes data insert, query, update and delete, schema creation and
modification, and data access control. Although SQL is often described as and to a great extent
is, a declaratives language(4GL), it also includes procedural elements.

SQL was one of the first commercial Languages for Edgar F. Codd’s relational model, as
described in his influential 1970 paper, ‘A Relational Model of Data for Large Shared Data
Banks”. Despite not entirely adhering to the relation model as described by Codd, it becomes the
most widely used database language.

VKIT, Dept. of CSE Page 2


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

1.3 Development using XAMPP

XAMPP is a free and open source cross-platform web server solution stack package developed
by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB.

XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a
simple, lightweight Apache distribution that makes it extremely easy for developers to create a
local web server for testing and deployment purposes. Everything needed to set up a web server
– server application (Apache), database (MariaDB), and scripting language (PHP) – is included
in an extractable file. This project is aimed to developing an online Registration for the events
conducted by ITACS.ITACS refers to innovative Technical Association for Computer Science.
It only deals with the technical events which is useful for the programmers.

1.4 Three Schema Architecture

Following are the three levels of database architecture:

• Physical Level
• Conceptual Level
• External Level

Fig 1.2 Three Schema Architecture

VKIT, Dept. of CSE Page 3


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

In the above diagram,

• It shows the architecture of DBMS.


• Mapping is the process of transforming request response between various
database levels of architecture.
• Mapping is not good for small database, because it takes more times.
• In External/Conceptual mapping, DBMS transforms a request on an external
schema against the conceptual schema.

• In Conceptual/Internal mapping, it is necessary to transform the request form the


conceptual to internal levels.

1. Physical Level:

• Physical level describes the physical storage structure of data in database.


• It is also known as Internal Level.
• This level is very close to physical storage of data.
• At lowest level, it is stored in the form of bits with the physical addresses on the
secondary storage device.
• At highest level, it can be viewed in the form of files.
• The internal schema defines the various stored data types. It uses a physical data
model.

2. Conceptual Level:

• Conceptual level describes the structure of the whole database for a group of
users.
• It is also a known as the data model.
• Conceptual schema is a representation of the entire content of the database.
• This schema contains all the information to build relevant external records.
• It hides the internal details of physical storage.

3. External Level:

• External level is related to the data which is viewed by individual end users.
• This level includes a no. of user views or external schemas.
• This level is closest to the user.

VKIT, Dept. of CSE Page 4


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

1.5 NORMALIZATION:

Here are the most commonly used normal forms:

1) First normal form (1NF):

• As per the rule of first normal form, an attribute(column) of a table


cannot hold multiple values. It should hold only atomic values.

2) Second normal form (2NF):

• A table is said to be in 2NF if both the following conditions hold:


• Table is in 1NF (First normal form)
• No non-prime attribute is dependent on the proper subset of any candidate
key of table.
• An attribute that is not part of any candidate key is known as non-prime
attribute.

3) Third normal form (3NF):

• A table design is said to be in 3NF if both the following conditions hold:


• Table must be in 2NF
• Transitive functional dependency of non-prime attribute on any super key
should be removed
• An attribute that is not part of any candidate key is known as non-prime
attribute.
• In other words 3NF can be explained like this : A table is in 3NF if it is
in 2NF and for each functional dependency X->Y at least one of the
following condition hold:
• X is a super key of table
• Y is a prime attribute of table
• An attribute that is a part of one of the candidate keys is known as prime
attribute.

VKIT, Dept. of CSE Page 5


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Boyce and Codd normal form (BCNF):

It is an advance version of 3NF that’s why it is also referred as 3.5NF. BCNF


is stricter than 3NF. A table compiles with BCNF if it is in 3NF and for every
functional dependency X->Y, X should be the super key of the table.

1.6 Description for ER-Diagram

An entity-relationship diagram (ERD) is a data modeling technique that graphically illustrates an


information system’s entities and the relationships between those entities. An ERD is a
conceptual and representational model of data used to represent the entity framework
infrastructure.

The elements of an ERD are:

 Entities
 Relationships
 Attributes

Steps involved in creating an ERD include:

1. Identifying and defining the entities


2. Determining all interactions between the entities
3. Analyzing the nature of interactions/determining the cardinality of the relationships
4. Creating the ERD

VKIT, Dept. of CSE Page 6


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 2

REQUIREMENT SPECIFICATIONS
2.1 Software Requirement

Technology: JAVA, JDBC, XAMPP.


Database: My SQL.
Runtime Environment: Notepad++.
Web Server: Tomcat Apache 9.0.
Operating system: Windows XP.
Browser: Internet Explorer 11

2.2 Hardware Requirement

Microprocessor; i3 fifth gen and above


Hard Disk Drive: 1024MB
RAM: 2048MB

2.3 About Connectivity

Create MySQL Database at the Localhost

Connect MySQL using Localhost Server.


 First, let me tell you what PHPMyAdmin is. It is a control panel from where you can
manage your database that you have created. Open your browser and go to
localhost/PHPMyAdmin or click “Admin” in XAMPP UI.When you first installed
XAMPP, it only created the username for it to be accessed; you now have to add a
password to it by yourself.

Now click Edit privileges and go to Change Admin password, type your password
there and save it. Remember this password as it will be use to connect to your
Database.

VKIT, Dept. of CSE Page 7


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Create Database

Now return to the homepage of phpmyadmin. Click New button to create a new
database.
In the new window, name your database as per your need, Now select Collation as
utf8_general_ci, and it will handle all of our queries and data Now click
on Create and your database will be created.

Create a Folder in htdocs

Now, locate the folder where you installed XAMPP and open htdocs folder (usually
c:/xampp). Create a new folder inside c: /xampp/htdocs/ and name it we will place
web files in this folder. Why we have created folder in htdocs? XAMPP uses folders
in htdocs to execute and run your PHP sites.

VKIT, Dept. of CSE Page 8


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 3

DATABASE DESIGN

3.1 ER RELATION MAPPING

STEP 1: For each regular (strong) entity type E in the ER schema, create a relation R that
includes all the simple attributes of E. Include only the simple component attributes of a
composite attribute. Choose one of the key attributes of E as primary key for R.

STEP 2: For each weak entity type W in the ER schema with owner entity type E, create a
relation R, and include all simple attributes (or simple components of composite
attributes) of the attributes of R.

STEP 3: For each binary 1:1 relationship type R in the ER schema, identify the relations
S and T that correspond to the entity types participating in R. Choose one of the
relations—S, say—and include as foreign key in S the primary key of T.

STEP 4: For each regular binary 1: N relationship type R, identify the relation S that
represents the participating entity type at the N-side of the relationship type.

STEP 5: For each binary M: N relationship type R, create a new relation S to represent R.
Include as foreign key attributes in S the primary keys of the relations that represent the
participating entity types; their combination will form the primary key of S.

STEP 6: For each multivalued attribute A, create a new relation R. This relation R will
include an attribute corresponding to A, plus the primary key attribute K—as a foreign
key in R—of the relation that represents the entity type or relationship type that has A as
an attribute.

STEP 7: For each binary relationship type R, where n > 2, create a new relation S to
represent R. Include as foreign key attributes in S the primary keys of the relations.

VKIT, Dept. of CSE Page 9


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

3.2 ER Diagram:

Fig 3.1 ER-Diagram of Online Bookstore Management System

VKIT, Dept. of CSE Page 10


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

3.3 Schema Diagram:

Book

B_id Title Year Price Pub_name

Author

Name Address Book_id

Publisher

Pub_name Address Phone_no

Customer

Cust_id Cust_name Address Phone_no

Order

Ord_no Purchase_amt Ord_date Cust_id

Fig 3.2 Schema Diagram of Online Bookstore Management System

VKIT, Dept. of CSE Page 11


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 4
IMPLEMENTATION
4.1 Introduction:
A database management system handles the requests generated from the SQL
interface, producing or modifying data in response to these requests. This involves a
multilevel processing system.

Fig .4.1 DBMS Execution and Parsing

level structure processes the SQL submitted by the user or application.


Parser: The SQL must be parsed and tokenized. Syntax errors are reported back to the
user. Parsing can be time consuming, so good quality DBMS implementations cache
queries after they have been parsed so that if the same query is submitted again the

VKIT, Dept. of CSE Page 12


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

cache copy can be used instead. To make the best use of this most systems use
placeholders in queries, like :

Executer: This takes the SQL tokens and basically translate it into relational algebra. Each
relational algebra fragment is optimized, and the passed down the levels to be acted on.

User: The concept of the user is required at this stage. This gives the query context, and
also allows security to be implemented on a per-user basis.

Transaction: The queries are executed in the transaction model. The same query from the
same user can be executing multiple times in different transactions. Each transaction is
quite separate.

Tables: The idea of the table structure is controlled at low level.

Table cache: Disks are slow, yet a disk is the best way of storing long-term data.
Memory is much faster, so it makes sense to keep as much table information as possible
in memory. The disk remains synchronized to memory as part of the transaction control
system.

Disks: Underlying almost all the database system is the disk storage system. This provides
storage for the DBMS system tables, user information, schema definition, and the user
data itself. It also provides the means for transaction logging.

4.2 CREATION OF TABLES:

BOOK
create table Book(B_id numeric(15), Title varchar(25), Year varchar(15), price
numeric(30),pub_name varchar(25),constraint cpk primary key(B_id),constraint bpk primary
key(pub_name));

AUTHOR
create table Author(Name varchar(25),Address varchar(25),Book_id numeric(15),constraint afk
foreign key(Book_id) references Book(B_id) on delete cascade);

VKIT, Dept. of CSE Page 13


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

PUBLISHER
create table Publisher(Pub_name varchar(25),Address varchar(25), Phone_no numeric(20),
constraint bfk foreign key(Pub_name) references Book(Pub_name) on delete cascade);

CUSTOMER
create table customer(cust_id numeric(20), cust_name varchar(15),Address
varchar(25),phone_no numeric(20),constraint ppk primary key(cust_id));

ORDER
create table order(ord_no numeric(20),purchase_amt numeric(20),ord_date varchar(25),cust_id
numeric(20), constraint xfk foreign key(cust_id) references customer(cust_id) on delete
cascade);

4.3 SOURCE CODE:

Code for insert

<head>
<?php
include("includes/head.inc.php");
?>
</head>
<body>
<!-- start header -->
<div id="header">
<div id="menu">
<?php
include("includes/menu.inc.php");
?>
</div>
</div>
<div id="logo-wrap">

VKIT, Dept. of CSE Page 14


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

<div id="logo">
<?php
include("includes/logo.inc.php");
?>
</div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="content">
<div class="post" style="margin-left:100px">
<h1 class="title" >Add Book</h1>
<div class="entry" >
<form action='process_addbook.php' method='POST' enctype="multipart/form-data">

<br><b>Book Name:</b><br>
<input type='text' name='name' size='40'>
<br><br>
<b>Category:</b><br>
<select name="cat">
<?php
$query="select * from category ";
$res=mysqli_query($conn,$query);
while($row=mysqli_fetch_assoc($res))
echo "<option disabled>".$row['cat_nm'];
$q2 = "select * from subcat where parent_id = ".$row['cat_id'];

VKIT, Dept. of CSE Page 15


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

$res2 = mysqli_query($conn,$q2) or die("Can't Execute Query..");


while($row2 = mysqli_fetch_assoc($res2))
echo '<option value="'.$row2['subcat_id'].'"> ---> '.$row2['subcat_nm'];
}
}
mysqli_close($link);
?>
</select
<br><br>
<b>Description:</b><br>
<textarea cols="40" rows="6" name='description' ></textarea>
<br><br>
<b>Publisher:</b><br>
<input type='text' name='publisher' size='40'>
<br><br>
<b>Edition:</b><br>
<input type='text' name='edition' size='40'>
<br><br>
<b>ISBN:</b><br>
<input type='text' name='isbn' size='40'>
<br><br>
<b>PAGES:</b><br>
<input type='text' name='pages' size='40'>
<br><br>
<b>PRICE:</b><br>
<input type='text' name='price' size='40'>
<br><br>
<b>Image:</b><br>

VKIT, Dept. of CSE Page 16


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

<input type='file' name='img' size='35'>


<br><br>
<input type='submit' value=' OK ' >
</form>
</div>
</div>
</div>
<!-- end content -->
<!-- start sidebar -->

<!-- end sidebar -->


<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
<?php
include("includes/footer.inc.php");
?>
</div>
<!-- end footer -->
</body>
</html>
Code for delete
<?php
require('includes/config.php');

$query="delete from book where b_id =".$_GET['b_id'];

VKIT, Dept. of CSE Page 17


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

mysqli_query($conn,$query) or die("can't Execute...");

header("location:all_book.php");
?>

VKIT, Dept. of CSE Page 18


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 5

TESTING
5.1 Introduction:

The purpose of testing is to discover errors. Testing is the process of trying to every
convincible fault or weakness in a work product. It provides a way to check the
functionality of components, sub-assemblies, assemblies, and/or finished product. It is the
process of exercising software with the intent of ensuring that the software system meets
its requirements and user expectations and does not fail in an unacceptable manner.

5.2 LEVELS OF TESTING:

5.2.1 UNIT TESTING:


Unity testing is a method by which individual units of source code, sets of one or more
computer program modules together with associated control data, usage procedures and
Operating procedures. For unit testing first we adopted the code testing strategy, which
examined the logic of program

5.2.2 GUI Testing:


GUI testing is use to ensure the visual clarity of the system, flexibility of the system, user
friendliness of the system. The various component which are to be tested are: i. Relative
layout ii. Various Link and Buttons.

5.2.3 OUTPUT TESTING:


After performing validation testing, the next step is output testing of the proposed system.
Since the system cannot be useful if it does not procedure the required output. Asking the
user about the user about this required format in which the system is required tests the output
displayed or generated by the system under consideration.

VKIT, Dept. of CSE Page 19


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Case Test Case Test Excepted Actual Output Pass /


Id Condition Output Fail
1 Validation Required Mandatory You have to Pass

Test Case Field field should not enter value in


be blank mandatory
Validation
Field
Regular A predefine Check Pass
format should be proper
Expression
follow format
Compare Check with Compare with Pass

Validation predefine control control


2 Registration on E-mail E-mail format E-mail format Pass
Must be must be input.

Input
Confirmation Password & Password & Pass

Password confirm Confirm


password match password
match.
Text field All information All Pass
must be input information
must be input
Mobile no Must be a digit Must be a digit Pass

VKIT, Dept. of CSE Page 20


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 6

RESULT AND SNAPSHHOT


6.1. Home Page:

6.2. Registration page:

VKIT, Dept. of CSE Page 21


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

6.3. Book List:

6.4. Contact page:

VKIT, Dept. of CSE Page 22


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

6.5. View Cart:

6.6. Order details:

VKIT, Dept. of CSE Page 23


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

6.7. Payment Details:

VKIT, Dept. of CSE Page 24


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

Chapter 7

CONCLUSION
The switch from written books being from bookstores to being ordered online or even just
digital copies has had profound effects on the industry including bookstores and libraries and
the general people of the world. The positives include easy access for everyone and cheaper
books along with saving natural resources. The negatives however are much greater and cannot
be ignored. Some of the negatives include the loss of jobs and businesses through the
digitalization of books, the loom threat of Google books, as well as losing a sense of our past.
Books have played such a large role in human history that it is bittersweet to be replacing them.
To me, it seems that e-books, Google books, and online retailers are the future and that the
future is good. But, if you look past all the conveniences and look at the people being affected
by this then it becomes clear that this is not a future that I want.

VKIT, Dept. of CSE Page 25


ONLINE BOOKSTORE MANAGEMENT SYSTEM 2018-19

BIBLIOGRAPHY
During the development of our system, we have taken the reference from various books and
journals, which we would like to mention in this section.

1. Database System Concepts - Fifth Edition.


2. Learning PHP, MySQL.
3. https://www.w3schools.com/php/php_syntax.asp
4. https://www.w3.org/Style/CSS/Overview.en.html

VKIT, Dept. of CSE Page 26

S-ar putea să vă placă și