0% found this document useful (0 votes)
14 views4 pages

Data Base Design

Uploaded by

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

Data Base Design

Uploaded by

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

Databases I Project

Project Group 24
Name: Email Address:

Timothy Leow [email protected]

Jordi Catafal [email protected]

Zhiping Hu [email protected]

Patel Hetvi [email protected]


Task 1: EER-diagram

Above is our ER diagram for Milestone 1. Notable decisions made about the design of the database are
explained below. In particular, we look into design decisions for Entities, and the Relations between them.

Entities

Department
● Dep_ID: Unique key.
● Is_homepage: A boolean attribute to indicate if the Department is the root Department that
contains the welcome text as its description. Its value is True only for the root Department
(homepage) and False for all other departments.
● URL: Contains the breadcrumbs: e.g, “Home/Electronics/Computer and tablets/Tablets”
● Description: Contains children attributes Long Description and Short
Description which will be queried based on what the webpage needs to be displayed in the
current page.
Product
● Prod_ID: Unique key.
● URL: Contains the breadcrumbs: e.g, “Home/Electronics/Computer and tablets/Tablets/iPad Air
5”
● Is_removed: A boolean attribute that indicates if a product is removed from the store. But we
want to keep it in the database in order to not lose information.
● Description: Contains children attributes Long Description and Short
Description which will be queried based on what the webpage needs to be displayed in the
current page.
● Retail Price: Contains relevant child attributes which will help to give information about
taxes/discounts and the Product’s original price.

Keyword
We decided to model it as a separate entity, to make querying keyword-related products easier, as
compared to if Keyword is a multi-valued attribute of product.
● Key_id: The primary key of a keyword.
● Text: Content of the keyword.

User
● SSN: Unique key.
● Name: Contains children attributes First Name and Last Name

Review
● Starcount: a certain number that is given by a registered user to rate a product,1 star being a
really bad product and 5 stars being a really good product.
● Text: An optional attribute (as indicated by the dotted line). comments about the product
made by the registers with long plain text.

Order

● Tracking Number: An optional attribute (as indicated by the dotted line). An order may or
may not have a tracking number for traceability purposes.

Relations:

Department Sells Products


A Department can sell many products, but each product should only belong to one leaf department (not
including parent departments via transitivity).
Department Parent/Child
A parent department can include several child departments, but each child department should only have 1
parent department.

Products Assigned to Keywords


A product may contain several keywords and a keyword may appear in tags of many products. So this is
a M:N relation.

Order Contains Products


An order can contain multiple products, and a product can be part of multiple orders. The price and
quantity at which the product was bought is contained as attributes of this relation.

User Places Orders


A user can place many orders, but an order can only be placed by one user.

User Writes Reviews


A user can write many reviews, but each review can only be written by one user.

Reviews About Product


A review is written about a specific product, but a product can have multiple reviews from different users.

You might also like