Académique Documents
Professionnel Documents
Culture Documents
Table of Contents
Database Development Plan.................................................................................... 3
1.
1.1
1.2
1.3
Business Rules............................................................................................... 5
1.4
1.4.2
Data dictionary........................................................................................ 7
Customer table..................................................................................................... 7
Products Table..................................................................................................... 7
Order Table......................................................................................................... 8
Categories........................................................................................................... 8
Suppliers............................................................................................................ 9
Purchase Order table.............................................................................................. 9
2.
SQL Queries to Data insertion and manipulation for Retails Store Database System.............10
2.1
2.2
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.2.7
2.2.8
2.2.9
2.2.10
2.2.11
2.3
2.3.1
2.3.2
2.3.3
2.3.4
3.
4.
2.3.5
2.3.6
3.2
DB Administration Plan.................................................................................24
3.3
3.4
3.5
4.2
4.3
4.4
References.............................................................................................................. 37
Current case study focuses on the retail store business environment and is need of an
automated Database System that can store, retrieve, update and synchronize the data
requirements of a typical retail store entities. Retail store has simple and static web pages
with no external interactions with the customers, suppliers or other stakeholders and thus, a
proper implementation of the dynamic website and associated DBMS is required for the
current case study. Online transactions like customer login, registration, purchase or sales
online and stock updates are not available for the current retail store and thus, a proper
dynamic data synchronization and update system is required (Devarajan, 2014) and the actual
business goals, objectives and proposed DBMS model is discussed in the following sections
High level goals and objectives of the proposed Database System for the current case of retail
store against dynamic website development are discussed and listed below
To design, configure and deploy a standards SQL Server Database with the required
dynamic database entities i.e. Customers, Orders, Products, Purchase Orders,
Database system, as proposed for the current online store of the retail business will meet the
dynamic interactions as required for the customers, managers and suppliers as well. SQL
Server can handle large datasets and for the proposed retail store online operations, customers
table will hold the data related to all the registered customers and their respective
authentication details i.e. customer id and customer password. Customers will login with their
authentication credentials and shop online i.e. purchase products, add products to the cart and
pay online (Tolman, 2014).
Products available with the current retail store will be made visible to the customers in the
products under various categories and the respective data will be stored or fetched from the
products and categories tables respectively. Thus the main problem as stated in the case study
with respective to dynamic interactions will be solved with the customer, orders, products and
categories tables (Miller, 2013). Further optimization to the proposed DBMS system will be
done by adding the required suppliers, billing and purchase information and will be discussed
in later parts of the document.
Business rules as defined and assumed against the implementation of proposed DBMS
system for online retail store operations are as listed
Every customer must be registered with the system and login further to access the
online operations of the retail store i.e. viewing, selecting, purchasing and payment
categories as well
Order of customers will contain the information related to products, categories,
1.4 Entity Relationship Diagram (ERD) of proposed online retail store DBMS
1.4.1
Entities as identified at this level for the proposed online and dynamic retail store DBMS
system are listed below
Customers
Orders
Products
Categories
Suppliers
Billing
More or additional entities might be included while developing the actual DBMS in SQL
Server and the high-level ERD post 3NF is as shown below
1.4.2
Data dictionary
Detailed data dictionary of the entities as shown in the above ERD are given below
Customer table
Column name
CustID
custFName
custLName
custPassword
Data type
Varchar(20)
Varchar(20)
Varchar(20)
Varchar(20)
Constraints
Primary key
Required
Description
Customer login id
Customer
first
Required
name
Customer
last
Required
name
Customer
login
custAddress
Varchar(40)
Required
password
Customer contact
custEmail
Varchar(20)
Required
address
Customer
Required
address
Customer contact
custPhone
Number(15)
phone or mobile
number
Products Table
Column name
prodID
prodName
prodCategoryID
Data type
Varchar(20)
Varchar(20)
Varchar(20)
Constraints
Primary key
Required
Required, Foreign key
Description
Product unique id
Product name
Foreign
key
reference
prodPriceperUnit
Number(5)
Required
category table
Product price per
unit
from
Order Table
Column name
ordered
orderDate
productID
Data type
Varchar(20)
Date
Varchar(20)
Constraints
Primary key
Required
Required, Foreign key
Description
Order unique id
Order date
Foreign
key
reference
customerID
Varchar(20)
from
product table
Foreign
key
reference
productQuantity
Number(5)
Required
from
customer table
Product quantity
purchased
Discounts
finalBill
Number(5)
Number(5)
over
NA
the order
Discount if any to
Require
the customer
Final
bill
calculated
on
the
is
based
product
Categories
Column name
catID
Data type
Varchar(20)
Constraints
Primary key
Description
Category unique
categoryName
supplierID
Varchar(20)
Varchar(20)
Required
Required, Foreign key
id
Category name
Foreign
key
reference
stockQuantity
Number(5)
Required
from
Suppliers table
Stock available
for the particular
category
Suppliers
Column name
supplierID
supplierName
supplierAddress
supplierPhone
Data type
Varchar(20)
Varchar(20)
Varchar(20)
Number(15)
Constraints
Primary key
Description
Supplier unique
Required
Required
Required
ID
Supplier Name
Supplier Address
Supplier Phone
supplierEmail
Varchar(20)
Required
number
Supplier
supplierAltContact
Numer(15)
Required
address
Supplier
Alternative
Contact number
Column name
poID
Data type
Varchar(20)
Constraints
Primary key
Description
Purchase
order
supplierID
Varchar(20)
unique ID
Foreign
key
reference
from
prodID
Varchar(20)
Supplier table
Foreign
key
reference
poDate
Quantity
Date
Number(10)
from
Required
Product table
Purchase
order
Required
date
Quantity of the
poPrice
Numer(10)
Required
products
Price
of
poStatus
Varchar(10)
Required
purchase order
Status of the
purchase order
the
2. SQL Queries to Data insertion and manipulation for Retails Store Database
System
Following SQL queries are written and executed to create the tables for the proposed
Database system of retail store
CREATE TABLE CUSTOMERS(
CustID Varchar(10)
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
OrderDate DATE
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
NOT NULL,
12
NOT NULL,
For each and every table as created, 20 rows are inserted using the below SQL queries
2.2.1
INSERT INTO CUSTOMERS VALUES (Cust001, 'Parker', 'R', 'cust1', '14-12-7, XYZ Lane,
Newyork', 'parker001@gmail.com', 00122342 );
INSERT INTO CUSTOMERS VALUES (Cust002, 'Prince', 'G', 'cust2', '9/B/8, BridgeLane',
'prince002@gmail.com', 001889722 );
INSERT INTO CUSTOMERS VALUES (Cust003, 'Aarush', 'King', 'cust3', '16/C/21,
Lakeview Towers', 'kingi90@yahoomail.com', 019083232 );
INSERT INTO CUSTOMERS VALUES (Cust004, 'Sunny', 'J', 'cust4', '89/2, Towers',
'jsunny009@gmail.com', 0364837 );
INSERT INTO CUSTOMERS VALUES (Cust005, 'James', 'C', 'cust5', '67/12/09, NielRoad',
'cjames1212@gmail.com', 01133432 );
INSERT INTO CUSTOMERS VALUES (Cust006, 'Allock', 'Y', 'cust6', '70-3-3/3',
'yalloock98@gmail.com', 0112231 );
INSERT INTO CUSTOMERS VALUES (Cust007, 'Michel', 'D', 'cust7', '001, Hieghts Lane',
'micheld1010@gmail.com', 02191231 );
INSERT INTO CUSTOMERS VALUES (Cust008, 'Jackson', 'I', 'cust8', 'Readers avenue
road, 45/f', 'ijack001111@gmail.com', 021998);
INSERT INTO CUSTOMERS VALUES (Cust009, 'Great', 'B', 'cust9', 'Bull street, 9th house',
'bgrtmeoo011@gmail.com', 0119921);
INSERT INTO CUSTOMERS VALUES (Cust010, 'Philips', 'S', 'cust10', 'Electronics hub
road, 19th lane', 'spsps00118@gmail.com', 0112351);
INSERT INTO CUSTOMERS VALUES (Cust011, 'Laura', 'O', 'cust11', 'Indian hub lane, 8th
avenue', 'olaura008@gmail.com', 0984201);
13
INSERT INTO CUSTOMERS VALUES (Cust012, 'Anna', 'T', 'cust12', 'Main street, Park
lane', 'annatg9900@gmail.com', 010901);
INSERT INTO CUSTOMERS VALUES (Cust013, 'Harika', 'V', 'cust13', 'Richmond view
towers, flat 67', 'vharika1259@gmail.com', 0198654);
INSERT INTO CUSTOMERS VALUES (Cust014, 'Haness', 'Q', 'cust14', 'Town road',
'hanessq1818@gmail.com', 014524);
INSERT INTO CUSTOMERS VALUES (Cust015, 'Gates', 'B', 'cust15', 'MS Avenue, 1st
building, 2nd floor', 'gatesbms2014@gmail.com', 010091);
INSERT INTO CUSTOMERS VALUES (Cust016, 'Rams', 'P', 'cust16', 'V Raod, Kth floor',
'prams0023@gmail.com', 0123412);
INSERT INTO CUSTOMERS VALUES (Cust017, 'Aaram', 'M', 'cust17', 'PK road, 32/12',
'maaram0011@gmail.com', 042012);
INSERT INTO CUSTOMERS VALUES (Cust018, 'Bills', 'F', 'cust18', 'Jawhar steet, 98-5t',
'fbills8190@gmail.com', 011331);
INSERT INTO CUSTOMERS VALUES (Cust019, 'Chand', 'S', 'cust19', 'Primary road,
lakeview avenue', 'schandmaths560@gmail.com', 0122119);
INSERT INTO CUSTOMERS VALUES (Cust020, 'Brown', 'W', 'cust20', 'Red water road,
3rd building, 2nd floor', 'wbrown77660@gmail.com', 013898);
2.2.2
INSERT
INTO
Suppliers
VALUES
('Supp001',
'FirstSupp',
'Wall
street',
'bestsuppliers009@gmail.com', 089987);
INSERT INTO Suppliers VALUES ('Supp002', 'SecondSupp', 'Cook book street',
'secondsuppliers0087@gmail.com', 081107);
INSERT INTO
Suppliers
VALUES
'thirdsuppliers054@gmail.com', 088675);
14
('Supp003',
'ThirdSupp',
'Bankers
chambers',
INSERT
INTO
Suppliers
VALUES
('Supp004',
'FourthSupp',
'Finance
towerss',
'fourthsuppliers11@gmail.com', 080051);
INSERT INTO Suppliers VALUES ('Supp005', 'FifthSuppliers', 'Great Britian towers',
'fifthuppliers112@gmail.com', 097051);
INSERT
INTO
Suppliers
VALUES
('Supp006',
'SixthSuppliers',
'Lower
towers',
'sixthsuppliers2314@gmail.com', 0911892);
INSERT INTO Suppliers VALUES ('Supp007', 'SeventhSuppliers', 'Top raod avenue',
'seventhsuppliers1241@gmail.com', 078811);
INSERT INTO Suppliers VALUES ('Supp008', 'EightSuppliers', 'Down moon towers',
'eitsupp9999gmail.com', 0122441);
INSERT INTO Suppliers VALUES ('Supp009', 'NineSuppliers', 'National partk roads',
'ninesupp007gmail.com', 019191);
INSERT
INTO
Suppliers
VALUES
('Supp010',
'TenthSuppliers',
'Clock
towers',
'tnsupp0110gmail.com', 010081);
INSERT INTO Suppliers VALUES ('Supp011', 'levenSuppliers', 'Green park avenue',
'levelnsupp88gmail.com', 0119911);
INSERT INTO Suppliers VALUES ('Supp012', 'twlevSuppliers', 'Marcks buildings',
'twlevupp3311gmail.com', 01891);
INSERT INTO Suppliers VALUES ('Supp013', 'thirteenSuppliers', 'Dragon avenye',
'thirteensupp001gmail.com', 099132);
INSERT INTO Suppliers VALUES ('Supp014', 'fourteenSuppliers', ' upper avenuie',
'fourteensupp1200gmail.com', 029811);
INSERT INTO Suppliers VALUES ('Supp015', 'fifteenSuppliers', ' Director chambers, 4th
building', 'fifteensupp10gmail.com', 011513);
INSERT INTO Suppliers VALUES ('Supp016', 'SixteSuppliers', ' GANPAT, 233 block',
'ramssupp16gmail.com', 016181);
15
INSERT INTO Suppliers VALUES ('Supp017', 'SeventSuppliers', ' HP road, 11th avenue',
'sevntensupp16gmail.com', 091718);
INSERT INTO Suppliers VALUES ('Supp018', 'EighteenSuppliers', ' MS avenue, 14th block',
'eighteensupp190gmail.com', 098888);
INSERT INTO Suppliers VALUES ('Supp019', 'NinetenSuppliers', ' Brigade bridge down,
1114th block', 'ninetensupp190gmail.com', 010288);
INSERT INTO Suppliers VALUES ('Supp020', 'TwotenSuppliers', ' Raheza towers, C block,
2nd floor', 'twnetysupp020gmail.com', 010202);
2.2.3
16
2.2.4
2.2.5
INSERT INTO Orders VALUES ('Ord012', 'June-23-2015', 'Prod005', 'Cust016', 20, 3, 510);
INSERT INTO Orders VALUES ('Ord013', 'July-13-2015', 'Prod020', 'Cust002', 8, 0, 100);
INSERT INTO Orders VALUES ('Ord014', 'October-13-2015', 'Prod006', 'Cust009', 18, 2,
270);
INSERT INTO Orders VALUES ('Ord015', 'December-03-2015', 'Prod008', 'Cust010', 9, 0,
22);
INSERT INTO Orders VALUES ('Ord016', 'September-12-2015', 'Prod018', 'Cust004', 11, 1,
130);
INSERT INTO Orders VALUES ('Ord017', 'Feb-14-2015', 'Prod001', 'Cust014', 14, 2, 310);
INSERT INTO Orders VALUES ('Ord018', 'April-10-2015', 'Prod012', 'Cust011', 12, 0, 110);
INSERT INTO Orders VALUES ('Ord019', 'April-16-2015', 'Prod011', 'Cust017', 13, 2, 200);
INSERT INTO Orders VALUES ('Ord020', 'December-16-2015', 'Prod016', 'Cust016', 16, 5,
100);
2.2.6
INTO
PurchaseOder
VALUES
('PoID015',
'October-23-2015',
'Prod020',
20
2.2.7
2.2.9
21
2.3.1
2.3.2
22
2.3.4
SELECT
Max(Products.ProductPriceperUnit)
AS
MaxOfProductPriceperUnit,
JOIN
Products
ON
Categories.CatID
Products.ProdCategoryID)
ON
Suppliers.SupplierID
PurchaseOder.SupplierID)
ON
Products.ProductID
2.3.6
TRANSFORM
Avg(Orders.finalBillAmount)
CUSTOMERS.CustID
FROM
AS
CUSTOMERS
AvgOffinalBillAmount
INNER
JOIN
SELECT
Orders
ON
Administration of the developed database is one of the complex issues for DB maintenance
and includes lot of factors in consideration. For the current DBMS as proposed, designed and
implemented for Retail Store online transactions, there are few security and access related
issues as mentioned in the case study evaluation. Based on these issues, a detailed
administration and transaction management plan is developed and discussed in this report.
Few issues with respective to the DBMS maintenance are considered or assumed in prior to
23
develop the transaction management and administration plan, which widely includes notes
related to recovery, backup, role based administration or DB login and group based access to
the DB entities (Lucila, 2014). Thus to achieve the key DB administration factors or
requirements like availability, maintainability, security and recovery, a proper DB
administration and transaction management plan is required and given in the below sections
For the current needs of Retail stores, a simple Database administration plan can be
developed by considering the main users, groups and roles those access the DB objects and
entities at regular intervals and the high level plan as considered for the Online transactions
of Retail DBMS is as given below
DB administration plan that suits the security, backup, recovery and user management of the
proposed Retail store DBMS has few important aspects considered and they are as listed
below
All the users of the Retail Store DBMS system will be identified and categorized over
fields like user name, user id, user role, responsibilities and access levels
Various access permissions and levels are given to the user groups created on the
centralized DBMS Server and these will include Creator, Editor, Author, Default and
24
Scheduled Agents, Automatic run mode agents and Triggers will act on the DBMS
server and verifies the user certificates and actions. A log will be maintained as a
separate table, where DB admin can access and take the necessary actions also
These triggers will also synchronize or update the database events or functions or
updates those happen on different local copies or replicas and reflect them on the
A sample SQL Server DBMS Administration console as used for the current Retail Store
Database System is as given below
Transaction management plan is required for enhanced performance of the current online
retail store Database Management System Server and the high level plan is as discussed
below
25
A simple Main transaction plan that can be employed for the current retail store is shown in
the above flow chart. Stored procedures are used in this context to add data and all the update
operations as written with UPDATE SQL Statement will trigger other Autonomous
transactions via a unique trigger. This trigger logs all the DML actions those happen on the
database entities of retail stored against checking UPDATE, DELETE and INSERT queries.
Now, the Rollback and Commit are also recorded over the log as written over the AT
(Autonomous Transaction) and the final commit will be done by recording the values to the
log i.e. commit code and user who has acted on the UPDATE operations on the DBMS
(Barber, 2015)
3.4 Database Security Procedure
Principles, policies and standards as required securing the Database of Retail Store are
considered over a simple procedure that runs on the centralized DBMS Server and the high
level flow is as given below
26
From the above procedure followed for the current DBMS of retail store, a single DB
instance is created against each secured SQL Server login and the required access the
database is achieved using the following metrics
27
User
Symmetric key
Services
Role
Asymmetric key
Assembly
Application level role and access
Remote Service Binding
Message type
Schema (Majid, 2013)
Windows based user and user group authentication is possible at the SQL Server
Administration console as shown below
28
Once these aspects are considered over the secured procedure, further user and user group
level permissions are set using the remote service bindings process. Required disaster
recovery procedure that is used over the centralized DBMS SQL Server of Retail Store
operations is as given below
Msg 33111, Level 16, State 3, Line 1
Cannot find server certificate with thumbprint
'0xFBFF1103AF133C22231AE2DD1D0CC6777366AAF1'.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally
A simple DB backup and recovery plan as followed for the current DB administration is
shown in the below snapshot
29
Detailed review, analysis, evaluation and discussion on various database systems for the
proposed online retail store with respective to DBMS creation, SQL Server updates and
administration plan are discussed in the previous report. From the core case study issues and
solutions as provided in this project, the future Database enhancement scope will vary based
on the varying business needs of the respective retail stores. Business requirements are
changes to meet the online and physical stores of the company and they were in the need of
statistical analysis and reports for all the database operations.
Thus, an enhanced DBMS maintenance and development is required apart from the
traditional SQL Server approach. Based on the intelligence goals of the retail store database
requirements, transfer of the data should be done in a complex way to meet the warehouse
aspects of the company and thus a sophisticated Data Warehouse implementation is required
for the current Database of Retail Store Online and Physical transactions or operations and
the future development plan as required is discussed below
For the current retail store database operations with respective to online and physical store
needs and to meet the future development plan, a desired database system should be selected
or recommended. In general the database systems can vary at a range of three levels like
object oriented, object relation and web based systems and the decisions made to choose the
required database system will impact the current and future DB maintenance of the retail
store database operations. Object oriented database systems can handle the BLOBs like
images, mixed media, audio, video and animations and this type of database is suitable for
single instance or single server database systems.
When the Relational Object oriented database systems are considered, it is always required to
model the data entities or objects with the relationship aspects among these entities as well.
RDBMS systems are relational and hybrid in nature and purely made up of tables and the
corresponding implementation of this type of database systems to meet the retail store data
requirements is discussed in the previous sections. A simple web based database system will
30
have web based access or UI and provides lot of opportunities in terms of HTML and CGI
script level access to the database elements with a simple login or authentication system
(Liao, 2014).
For the current retail store system case study and its future needs, a web based database
approach will be helpful in terms of query and API requirements. Existing infrastructure can
be used to migrate the current database to web based database by setting the required network
like LAN, WAN and Internet connections and providing the user access respectively.
For migrate or upgrade the current database to distributed systems, a simple Business
intelligence logic can be added to the existing database requirements. BI can be adopted with
the help of SAP BI and SAP HANA. SAP provides complex and high volume database
support for Retail Store operations and the required migration can be done using the standard
procedures. Once the retail store data is shifted or migrated to SAP BI system, architecture of
entire database will be changed to act as typical distributed system and the client level access
can be provided to the end users. SAP BI will provide lot of decision making aspects by
visualizing the reports annually, quarterly and monthly and the entire report generation
process will take few seconds, which is very less when compared to the traditional SQL
Server approach (Delen, 2013). SAP ABAP level programming interface will be used to code
the report requirements and the standard procedures will run on the SAP BI server and the
entire reports can be easily generated as well. This distributed architecture can be held
through a web based access by providing login and authentication as defined at the
administration and ACL level.
There are few noted benefits with the data warehousing and data distributed system approach
as proposed with SAP BI and few of them are as listed in terms of Return On Investment
(ROI) and an approximate estimate for 3 years is as given below (Mary, 2012)
31
Resources as required for warehousing the current Database requirements of Retail Store is as
given below
Some of the key benefits as associated with the current cost based approach and ROI
calculation for Database warehouse implementation are shown below
32
ROI savings for the proposed project in terms of resource usage and allocation is as given
below
33
A 3 year estimate in terms of cost benefits and savings is calculated for 3 years and given
below
34
Problems associated with data warehousing of the current retail store DBMS can be handled
with few solutions and they are as listed below
Data that is never used can be shifted to archives and can be retrieved based on the
backup and archiving will help in improving the overall performance as well
All the hidden problems as associated with the source system will be recovered or
handled with automation management tools and techniques and high level end user
training to the resources will help a lot in this context (Haluk, 2013)
35
References
(ICDE), 21(1),18-25.
Delen, D. (2013). Leveraging the capabilities of service-oriented decision support
systems:
Putting
analytics
and
big
data
in
cloud. Decision
CONSTITUTION
FOR
Support
ONLINE
Cognitive
Research
in
Science,
Engineering
and
Education
of
Putting
analytics
and
big
data
in
cloud. Decision
Support
(IJDWM), 20(1),89-91.
Lucila , O. (2014). CLARA: an integrated clinical research administration
36
37