Dbms Casestudy
Dbms Casestudy
Case Study
1
Submitted by-
2
INDEX
3 MySQL Database 6
4 Data Model
7
5 Database Design 7
6 Conclusion 12
3
Abstract
The business-to-consumer aspect of electronic commerce (e-commerce) is the most visible business
use of the World Wide Web. The primary goal of an e-commerce site is to sell goods and services
online.
This project deals with developing an e-commerce website for Online Book Sale. It provides the user
with a catalog of different books available for purchase in the store. In order to facilitate online
purchase a shopping cart is provided to the user.
The system is implemented using a 3-tier approach, with a backend database, a middle tier of
Microsoft Internet Information Services (IIS) and ASP.NET, and a web browser as the front end
client. In order to develop an e-commerce website, a number of Technologies must be studied and
understood.
These include multi-tiered architecture, server and client side scripting techniques, implementation
technologies such as ASP.NET, programming language (such as C#, VB.NET), relational databases
(such as MySQL, Access).
This is a project with the objective to develop a basic website where a consumer is provided with a
shopping cart application and also to know about the technologies used to develop such an
application. This document will discuss each of the underlying technologies to create and implement
an e-commerce website.
4
Introduction
E-commerce is fast gaining ground as an accepted and used business paradigm. More and more
business houses are implementing web sites providing functionality for performing commercial
transactions over the web.
It is reasonable to say that the process of shopping on the web is becoming commonplace. The
objective of this project is to develop a general purpose e-commerce store where any product (such as
books, CDs, computers, mobile phones, electronic items, and home appliances) can be bought from
the comfort of home through the Internet. However, for implementation purposes, this paper will deal
with an online book store.
An online store is a virtual store on the Internet where customers can browse the catalog and select
products of interest. The selected items may be collected in a shopping cart. At checkout time, the
items in the shopping cart will be presented as an order.
At that time, more information will be needed to complete the transaction. Usually, the customer will
be asked to fill or select a billing address, a shipping address, a shipping option, and payment
information such as credit card number. An e-mail notification is sent to the customer as soon as the
order is placed
5
MySQL Database
In this project, MySQL is used as the backend database. MySQL is an opensource database
management system.
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 ASP.NET 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.
6
Data Model
A data model is a conceptual representation of the data structures that are required by a database. The
first step in designing a database is to develop an Entity-Relation Diagram (ERD). The ERD serves
as a blue print from which a relational database maybe deduced. Figure 1 shows the ERD for the
project and later we will show the transformation from ERD to the Re lational model.
entity A matches exactly one record in entity B and every record in B matches exactly one record in
A. One to many means that every record in A matches zero or more records in B and every record in
B matches exactly one record in A.
If there is a one to many relationship between two entities, then these entities are represented as
Associative Entities. In the Relational Database model, each of the entities will be transformed into a
table. The tables are shown below along with the attributes.
Database Design
In this section, the basic structure of the tables composing the database for theproject are shown along
with information about primary and foreign keys.
Customer
7
9 Email Address Varchar
10 Phone_Number Varchar
Books
State_Tax
Shopping_Cart_Items
8
Order_Details
Shipping_Type
Credit_Card_Details
9
SNO NAME TYPE DESCRIPTION
1 Credit Username Varchar Primary key for Customer Identification
2 Credit Card Varchar
Number
3 Card Type Varchar Master Card, Visa, Discover
4 CVV Number Integer Number present on the back of the card for
extra security
5 Expiry Date Date
6 UserID Varchar Foreign key to Customer
Book_Review
Purchase_History
10
11
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 theshop looks poor or like hundreds of other
shops the customer is most likely to skip to the other site”[16]. 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 ASP.NET as the Technology.
ASP.NET has several advantages such as enhanced performance scalability, built- in security
and simplicity. To build any web application using ASP.NET we need a programming language
such as C#, VB.NET, J# and so on. C# was the language used to build this application. For the
client browser to connect to the ASP.NET engine we used Microsoft’s Internet Information
Services (IIS) as the Web Server. ASP.NET uses ADO.NET 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 ASP.NET 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 mo re 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 ASP.NET 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.
12