Hamza Asif (BC220401075)
SEMESTER SPRING 2024
ASSIGNMENT No. 01
Database Management Systems (CS403)
Total Marks: 20 Date: (23 Apr – 29 Apr 2024)
Question:
Task No. 01:
Marks:05
Draw a Context Level Data Flow Diagram (DFD) of the given bookstore system.
Answer: Create Account
Search Book
Manage Books
Online
Admin Bookstore Add to Cart
Customer
Manage Orders
Make Payment
Task No. 02:
Marks:15
Identify all possible entities and their attributes in the given system.
Extract all relationships among the entities.
Draw a comprehensive Entity Relationship Diagram (ERD) of the given bookstore system
showing all entities, their attributes, and relationships among entities that you have identified.
Your ERD must show all minimum and maximum cardinalities clearly.
Answer:
Entities and their attributes:
1. Book
ISBN (Primary Key)
Title
Publication Year
Price
Quantity in Stock
Genre(s)
2. Author
Author ID (Primary Key)
Name
Biography
3. Genre
Genre ID (Primary Key)
Genre Name
4. Customer
Customer ID (Primary Key)
Name
Email Address
Shipping Address
5. Order
Order ID (Primary Key)
Customer ID (Foreign Key)
Order Date
Total Price
6. Order Detail
Order Detail ID (Primary Key)
Order ID (Foreign Key)
ISBN (Foreign Key)
Quantity
Price at the Time of Purchase
Name
Author ID Bio
Author Phone
Name
Number
M Customer ID Email
Customer
Address
Have
1
Quantity Buy Have
M Print Date
M
Price Customer ID Order Date
M
Book Total Price
ISBN
M Has M
Orders
M Contents
Order ID
M
Have
Have
Name M ISBN Order ID
M
Genre ID Order Details ID Price
Genre Bio
Order Details
Quantity
The End