0% found this document useful (0 votes)
4 views

Learning Journal Unit 2

Uploaded by

eddburkes
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Learning Journal Unit 2

Uploaded by

eddburkes
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1

Entity-Relationship (E-R) Modelling

Unit 2: Entity-Relationship (E-R) Modelling


Computer Science Department: University of the People
CS 2203 - Databases 1
Shanthini S
November 28, 2024.
2
Entity-Relationship (E-R) Modelling

Introduction

As a database administrator, to enhance the ecommerce system to better manage inventory,

orders and customers, I will designing a data model for this database.

Data modeling is a process that helps us to understand the structure, form and relationships of

information. (Groves.M, 2022)

1. We will begin by building a logical data Model and then define the entities, their

relationships and key attributes as follows;

PRODUCT

 Product_id (primary key)

 Name

 Description

 Price

 Category

Customer

 Customer_id(Primary_key)

 First_name

 Last_name

 Email

 Phone

 Address

Order
3
Entity-Relationship (E-R) Modelling
 Order_id(primary Key)

 Customer_id (foreign key)

 Order_date

 Total_amount

 Status

Inventroy

 Inventory_id(Primary Key)

 Product_id(foreign key)

 Quantity

 Las_updated.

Here is how I will define the relationships between entities and attributes;

 Customer to order: one-to-many(1:N) ie. One customer can place many orders

 Product to inventory : One-to-One(1:1) Each oroduct has one inventory record

 Order to product: Many – to -Many (M:N) ie. One order can contain multiple

products and one product can be in multiple orders.

2. Here’s a table translation of the data.

Customer Table
4
Entity-Relationship (E-R) Modelling
Customer_id First_name Last_name Address Email phone

(PK)

001 John Doe 155 Heaven [email protected] 01249343

st. om

Product Table

Product_id Name Description Price category

P1001 PlayStation 5 Digital edition 1300 Electronics

Order Table

Order_id (PK,FK) Customer_id (PK, FK) Order_date Total_amount Status

D0001 001 12-01-2024 1300 shipped

Inventory Table

Inventory_id (PK) Product_id(FK) Quantity Last_updated

0001 D001 10 01-12-2024


5
Entity-Relationship (E-R) Modelling
3. Here’s an ER Diagram to visualize the database structure.

4. Here are two key differences between conceptual and Physical Design in this contest;

 Conceptual design focuses mainly on the high-level entities and relationships

such as how customers relate to orders without considering the

implementation of the details involved. In this contest the conceptual model

only identifies the relationship between the products, customers, orders and

the inventory and their attributes. This is the abstract level of the database

design
6
Entity-Relationship (E-R) Modelling
Whiles, the physical design deals with the actual implementation details like

the data types, indexing, storage considerations. This is the aspect that

translates the conceptual design into a physical database

 Conceptual database model creates an ER diagram to visualize the data

structure. Whiles the physical database implements the visualized design into

a physical database for storage, it also considers hardware and software

constraints.

REFERENCE:

Groves, M. (2022, October 7). What is data modeling? Conceptual, physical,

logical. https://www.couchbase.com/blog/conceptual-physical-logical-data-

models/

You might also like