SlideShare a Scribd company logo
1 of 42
No

Registration No

Name

1

MMW/13/B1/14

K.K.M.Kodithuwakku

2

SOF/13/B1/18

I.P.S.Siriwardana

3

SOF/13/B1/21

E.M.K.Udayakanthi

4

SOF/13/B1/27

H.G.S.K.Wijenayaka

5

SOF/13/B1/07

H.A.V.Nishshanka

6

SOF/13/B1/16

H.M.P.Renuka
 Introduction
 Requirements Analysis
 Conceptual Database Design
•
•
•
•

EER diagram
Mapping
Integrity constraints
Business rules

 Logical Database Design
• Choosing a DBMS and Relational schema

 Schema Refinement
• Normalization
 Physical Database Design
•
•
•
•
•

Workload Analysis
Creating tables
Creating triggers
Creating indexes
Creating views

 Security Design
•

Creating user levels and privileges

 References
 Q&A
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.
•

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
Order books online
Customer should be able to update order
Online payment methods
Various user levels and privileges
Online stock control
.
• 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.
Steps
Book (ISBN:CHAR(18), title:VARCHAR(60), author:VARCHAR(45)
,price:FLOAT, noofbooks:INT(11), category:VARCHAR(45))

Customer(CID:INT(11), name:VARCHAR(30), contactno:CHAR(13),
email:VARCHAR(30), city:VARCHAR(15),

loggpassword:VARCHAR(30), number:INT, street:VARCHAR(15))
BookCustomer(ISBN:VARCHAR(20), CID:INT(11))
Order(OID:INT(11), quantity:INT, dateCreated:DATE,
bookName:VARCHAR(20), EmpID:INT(11))
Employee(EmpID:INT(11), name:VARCHAR(20))
Credit Card(paymentID:INT(11),CCN:CHAR(16),
name:VARCHAR(30), date:DATE, type:VARCHAR(45),
pinNumber:INT(16))
Paypal(paymentID:INT(11), email:VARCHAR(30),
password:VARCHAR(30))
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
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
 To check
ISBN
 For
re order level
 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)
 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.
 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
http://stackoverflow.com/questions
http://www.cs.duke.edu/csl/docs/mysqlrefman/triggers.html

https://academy.oracle.com/oa-web-overview.html
https://www.mdgunasena.com
https://www.deweydecimal.com
 Mapping Regular Entities
 Mapping Supertype/Subtype relationship

Credit Card disjoint Paypal
 Mapping Binary Relationships
1:M Relationship
 Mapping Binary Relationships cont…
 Mapping Binary Relationships cont…
1:1 Relationship
 Mapping Binary Relationships cont…
Back

M:N Relationship

More Related Content

More from Mahesh Kodituwakku

DFD,Activity Diagram ,Document Flow Diagram
DFD,Activity Diagram ,Document Flow DiagramDFD,Activity Diagram ,Document Flow Diagram
DFD,Activity Diagram ,Document Flow DiagramMahesh Kodituwakku
 
G.C.E O/L Model Papers( for 2019)
G.C.E O/L Model Papers( for 2019)G.C.E O/L Model Papers( for 2019)
G.C.E O/L Model Papers( for 2019)Mahesh Kodituwakku
 
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019Mahesh Kodituwakku
 
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුමMahesh Kodituwakku
 

More from Mahesh Kodituwakku (20)

AL ICT -Part 2
AL ICT -Part 2AL ICT -Part 2
AL ICT -Part 2
 
AL ICT -Part 1
AL ICT -Part 1AL ICT -Part 1
AL ICT -Part 1
 
ICT Model Paper
ICT Model PaperICT Model Paper
ICT Model Paper
 
AL ICT Lesson 1 Questions
AL ICT Lesson 1 QuestionsAL ICT Lesson 1 Questions
AL ICT Lesson 1 Questions
 
OSI Model
OSI ModelOSI Model
OSI Model
 
G.C.E O/L and A/L Lessons
G.C.E O/L and A/L LessonsG.C.E O/L and A/L Lessons
G.C.E O/L and A/L Lessons
 
G.C.E. O/L ICT(Lesson 1)
G.C.E. O/L ICT(Lesson 1)G.C.E. O/L ICT(Lesson 1)
G.C.E. O/L ICT(Lesson 1)
 
G.C.E.AL ICT
G.C.E.AL ICT G.C.E.AL ICT
G.C.E.AL ICT
 
G.C.E. O/L ICT
G.C.E. O/L ICTG.C.E. O/L ICT
G.C.E. O/L ICT
 
AI
AIAI
AI
 
DFD,Activity Diagram ,Document Flow Diagram
DFD,Activity Diagram ,Document Flow DiagramDFD,Activity Diagram ,Document Flow Diagram
DFD,Activity Diagram ,Document Flow Diagram
 
AL ICT Lesson 13
AL ICT Lesson 13AL ICT Lesson 13
AL ICT Lesson 13
 
HTML Questions
HTML QuestionsHTML Questions
HTML Questions
 
G.C.E O/L Model Papers( for 2019)
G.C.E O/L Model Papers( for 2019)G.C.E O/L Model Papers( for 2019)
G.C.E O/L Model Papers( for 2019)
 
G.C.E A/L ICT Grade 12 paper
G.C.E A/L ICT Grade 12 paperG.C.E A/L ICT Grade 12 paper
G.C.E A/L ICT Grade 12 paper
 
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019
දකුණු පලාත් උසස් පෙළ තොරතුරු තාක්ෂණය ප්‍රශ්න පත්‍රය 2019
 
Arduino Basic for Grade 9
Arduino Basic for Grade 9Arduino Basic for Grade 9
Arduino Basic for Grade 9
 
ICT Grade 8 and 9
ICT Grade 8 and 9ICT Grade 8 and 9
ICT Grade 8 and 9
 
Grade 7 ICT
Grade 7 ICTGrade 7 ICT
Grade 7 ICT
 
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම
7 වන ඒකකය - පද්ධති විශ්ලේශනය හා පිරිසැලසුම
 

Recently uploaded

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 

Recently uploaded (20)

Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 

Database Design for Online Book Store

Editor's Notes

  1. 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.
  2. These r the points included in our presentation.
  3. 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.
  4. 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 &amp; 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 &amp; Book side Partial par.
  5. 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.
  6. 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
  7. Manager wants only 2 empS touse the system. They manage the orders placed by custmS. Manager should have all the previleges.
  8. 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.
  9. 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 &amp; 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 &amp; Book side Partial par.
  10. We introduced some BR
  11. The DBMS that we used to implement our DB is MQSQL server. Coz…………………………………?????
  12. By using the Mapping? we created R schema.
  13. While on mapping our db
  14. Check constraint does not performed by MYSQL. So we created triggers to validate ………???
  15. 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.
  16. We created an index for book table Giving the chance to customer to search the book using Author name. Index provides customer fast access.
  17. 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?
  18. 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”.
  19. 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