This document outlines the database design process for an online bookstore. It includes sections on requirements analysis, conceptual design using EER diagrams, logical design by choosing a DBMS and relational schema, physical design including tables, triggers and views, and security design with user privileges. It also includes sample tables for books, customers, orders, employees, and payment details. Steps are provided for online ordering, payments, and stock control. Considerations around data governance, SQL injection, backups and third party connections are also discussed.
5. Royal book shop in Ambalangoda still uses a conventional system for
their transaction and inventory control. Even though the Book Shop
runs in large scale, manual system gets the business down.
- It requires more space, time, labour and stationery
- It is Slow and less security.
- It is difficult to update data and retrieve details
This study shows that how systematic book sales and management is
important to improve its quality by giving the chance for the customer
to order books online.
6.
7. •
Order books online
•
Customer should be able to update the order
•
Online payment methods.
•
Various user levels and privileges.
•
Online stock control
•
Security levels and policies
15. • Transactions can be done by the customers only in
Sri Lanka.
• 10%discount is given from total price for literary
month
• New entries are entered at the end of month.
• The payments should be made on the day that
order is placed.
23. Query/Function
Delimiter$$
If Char_ length(ISBN)!=14
then
Signal SQL state ‘1200’
Set message.Text= ‘Invalid
ISBN’;
End if
End$$
Delimiter
Delimiter$$
If (Quantity)<10 then
Signal SQL state ‘1200’
Set message.Text= ‘!!Alert
Book
Order;
End if
End$$
Delimiter
Affected
table
Table data
amount
Affected attribute
Book
ISBN=14
ISBN
Book
Order
10<
decrement
How often
Index required
or not
High
Yes (Based on
Title, Author)
No_of_Books
INSERT INTO Book VALUES(“
Book
“)
All the attributes in
the Book table
No
One month
Yes. Based on
category
24. UPDATE Book set
price=“ ”
Where
update price
Price
Book
One
month
Yes. Based
on category
high
Book
No
Price, Quantity,
set `final_price` =
`price` *
(select
ifnull(Quentity)
from Product
where .Order_ID=
Order.Order_ID;
varies
Order
Total price
30. User Access Control
User
Privilege
Administrator
(Manager)
All the privileges of the
database
Employee 1(Clerk1) Select, View, insert and
update the database
Employee 2 (Clerk2) View tables (book and
customer tables)
31.
32. Sensitive Data and Secure connection
(Credit card Number, PIN and PayPal password )
Encrypt the password and PIN
Get SSL certificate for the web site
Crash Recovery
Take a dump file (backup) of the database
Email policy
Send a code to user’s email to verify the user’s
mail account.
33. SQL Injection
Install Firewalls and intrusion detection mechanisms.
Patch server database, programming language (php)
and operating system (windows server 2008)
Third Party Connection
In order to get the payment facility Our database
should be connected to a third party.
Data Governance
Good morning Sir, Goodmevybody, We belong to Panorama group. And our group consists of 6 members. We all worked together in unity. Everyone contributed in max to complete the project.
These r the points included in our presentation.
The industry that we selected for our project is Royal book shop , Ambalangoda. It uses a manual system. Staff consists of 5 members.After having a discussion with the owner and the employees the owner wanted us to implement an inventory control system with online transaction.We could prepare a req doc in a week.
New system allows cus to buy books on line. This is how we addressed it in ERD. Related mapping part is available here. We hope to discuss it in our full mapping.As u ol can c, This shows M:N relationship. 1 cus can buy many books & 1 book can be bought by many cus. AS BOOK TITLE IS ASSIGNED ONE ISBN, COPIES HAVE SAME ISBN. SO WE ASSUME THAT1 book can be bought by many cus. And also Participation constraints r available here. Each cus has a book where as each book may not have a cus. So, Cus side dipicts Tot Par & Book side Partial par.
In here we consider the order as shopping cart. He can update the order. But The payments should be made on the day that order is placed. We have mentioned it as a business rule.Aftr he places the order /made the payment cus relation is auto generated. We used SL commands for that.
Cus is given the chance to pay on line. He can either use CC or Paypalmthed. When on mapping ,Enforce the Covering constraints – Sub classes r disjoint. They cover the super class entity. ISA relationship is total. We created two new relations for sub Cs such that all the attr of super C r added to both new relations. PK of super C becomes the PK of new relations
Manager wants only 2 empS touse the system. They manage the orders placed by custmS. Manager should have all the previleges.
The bookstore owner wants the system to be designed as such when no of book reach 10 , re order level msg is auto generated.So we added an attr as “no of books” . Whenever an transaction takes place the value is auto updated.
This is how we addressed analizedreq in a EERD. As u ol can c, This shows M:N relationship. 1 cus can buy many books & 1 book can be bought by many cus. AS BOOK TITLE IS ASSIGNED ONE ISBN, COPIES HAVE SAME ISBN. SO WE ASSUME THAT1 book can be bought by many cus. And also Participation constraints r available here. Each cus has a book where as each book may not have a cus. So, Cus side dipicts Tot Par & Book side Partial par.
We introduced some BR
The DBMS that we used to implement our DB is MQSQL server. Coz…………………………………?????
By using the Mapping? we created R schema.
While on mapping our db
Check constraint does not performed by MYSQL. So we created triggers to validate ………???
when no of book reach 10 , re order level msg is auto generated. So we added an attr as “no of books” . Whenever an transaction takes place the value is auto updated.
We created an index for book table Giving the chance to customer to search the book using Author name. Index provides customer fast access.
We created dif user levels for 2 empS , manager and customer. 1emp is granted Select, View, insert and update the database whlie other emp is granted view particular tables only. Screen shot? Manager is granted full authorization of the DB. For eg, Deletion should be done by the emp under permission of manager. Cus?
To achieve the accuracy of the data in DB, we used Domain constraints which is a type of Integrity constraints. ……..picture ……….To maintain atomicity we created a new relation called “cidcontactno”.
Enforce the Covering constraints – Sub classes r disjoint. They cover the super class entity. ISA relationship is total. We created two new relations for sub Cs such that all the attr of super C r added to both new relations. PK of super C becomes the PK of new relations