Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Student ID: Bc220421863

Student Name: Roha Noor

Assignment No. 01 (Graded)


Spring 2024
CS403- Database Management System
Total Marks: 20

Task no 1:
 Draw a Context Level Data Flow Diagram (DFD) of the given bookstore system.

ANSWER:

Task No. 02:


 Identify all possible entities and their attributes in the given system.

ANSWER:

Entities and their attributes:

1. Books:
 ISBN (Primary Key)
 Title
 Publication year
 Price
 Quantity in stock

2. Authors:
 Author ID (Primary Key)
 Name
 Biography

3. Genres:
 Genre ID (Primary Key)
 Genre Name

4. Customers:
 Customer ID (Primary Key)
 Name
 Email
 contact
 Shipping

5. Orders:
 Order ID (Primary Key)
 Order date
 Total price

6. Order Details:
 Order Detail ID (Primary Key)
 Order ID (Foreign Key referencing Orders)
 ISBN (Foreign Key referencing Books)
 Quantity
 Price at the time of purchase

 Extract all relationships among the entities.

Relationships:

1. Books - Authors:
 Many-to-Many relationship since a book can have multiple authors and an author can
write multiple books.

2. Books - Genres:
 Many-to-Many relationship since a book can belong to multiple genres and a genre can
have multiple books.

3. Customers - Orders:
 One-to-Many relationship since a customer can place multiple orders but each order is
associated with only one customer.

4. Orders - Order Details:


 One-to-Many relationship since an order can have multiple order details but each order
detail is associated with only one order.

5. Books - Order Details:


 One-to-Many relationship since a book can be part of multiple order details but each
order detail is associated with only one book.

ERD Diagram:

You might also like