0% found this document useful (0 votes)
8 views3 pages

Fall 2024 - CS406 - 1

The document outlines an assignment for designing a database for a clothing brand shop, Style Maker, using ER model concepts. It identifies key entities such as Product, Customer, Order, Employee, and Supplier, along with their attributes and types. Additionally, it defines primary and candidate keys for each entity and describes the relationships and mapping cardinalities between them.

Uploaded by

wasif kayani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Fall 2024 - CS406 - 1

The document outlines an assignment for designing a database for a clothing brand shop, Style Maker, using ER model concepts. It identifies key entities such as Product, Customer, Order, Employee, and Supplier, along with their attributes and types. Additionally, it defines primary and candidate keys for each entity and describes the relationships and mapping cardinalities between them.

Uploaded by

wasif kayani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS406 – Web Based Database Applications

Assignment#1
Name: Arooj Hamayun
Student ID: bc230216643

Scenario:
A popular clothing brand shop, Style Maker, wants to develop a database to better manage
its operations. The store sells a variety of clothing items, including shirts, pants, jackets,
and accessories. Each product has specific details such as brand, category, price, and size
availability. The shop also employs a team to manage orders, assist customers, and restock
products as needed. The store sources products from several suppliers, who regularly
update the store's inventory.

Using the ER model concepts, design a structured database for Style Maker to efficiently
manage products, track customer orders, and maintain relationships with suppliers.

Question: 1
Components to Design an ER Diagram for Style Maker:
1. Identify all key entities that Style Maker would need to manage its products,
customers, orders, employees, and suppliers.
Answer: All key entities that Style Maker would need to manage its products, customers,
orders, employees, and suppliers are given below:
 Product: It shows the items sold by Style Maker.
 Customer: It shows the customers who purchase items or products.
 Order: It shows the orders placed by customers.
 Employee: It shows the staff working at Style Maker.
 Supplier: It shows the suppliers who supply products.

2. Specify the attributes for each entity and categorize them into different types
(simple, composite, derived, single-valued, and multi-valued).

Answer: The attributes of each entity and their different types are described below:

Product
 Simple: ProductID (Primary Key), Brand, Category, Price
 Composite: Size (SizeID, SizeValue)
 Multi-valued: SizeAvailability (list of sizes available)
Customer
 Simple: CustomerID (Primary Key), Name, Email, Phone
 Composite: Address (Street, City, State, ZipCode)
Order
 Simple: OrderID (Primary Key), OrderDate, TotalAmount
 Derived: TotalAmount (calculated from order details)
 Multi-valued: OrderItems (list of product IDs)
Employee
 Simple: EmployeeID (Primary Key), Name, Position, HireDate, Salary
 Composite: ContactInfo (Phone, Email)
 Derived: Experience (calculated from HireDate)
Supplier
 Simple: SupplierID (Primary Key), Name, ContactNumber
 Composite: Address (Street, City, State, ZipCode)

3. Define the primary keys and candidate keys for each entity.

Answer: The primary keys and candidate keys for each entity are described below:
Product
 Primary Key: ProductID
 Candidate Keys: Brand, Category
Customer
 Primary Key: CustomerID
 Candidate Keys: Email, Phone
Order
 Primary Key: OrderID
 Candidate Keys: OrderDate
Employee
 Primary Key: EmployeeID
 Candidate Keys: Email, Phone
Supplier
 Primary Key: SupplierID
 Candidate Keys: ContactNumber, Name

4. Determine the relationships between entities and specify mapping cardinalities (one-
to-one, one-to-many, etc.).
Answer: Relationships between entities and mapping cardinalities:
Customer - Order: One-to-Many (A customer can place multiple orders, but each order is
placed by a single customer)
Order – Product: Many-to-Many (Each order can contain multiple products, and each
product can be a part of multiple orders)
Order – Employee: One-to-Many (An employee can manage multiple orders, but each order
is managed by a single employee)
Product – Supplier: Many-to-Many (Each product can be supplied by multiple suppliers,
and each supplier can supply multiple products)
Product and Category: One-to-Many (Each product belongs to one category, but each
category can have multiple products)

You might also like