Anda di halaman 1dari 9

JOBSHEET 3: Entity Relationship Diagram (ERD) (Bagian 1)

Dosen Pembimbing :
Yan Watequlis Syaifudin, ST., MMT., PhD.

STUDY PROGRAM D-IV


TEKNIK INFORMATIKA POLITEKNIK NEGERI MALANG
Jl. Soekarno Hatta No. 9 Malang 65144

Student name : Hammam abdullah Saeed B.G


Nim : ( 2341720203)
N.a : 12
Class : TI_I1
Theory

Stage 1: Identify Entities


 Employees:

Attributes :

 Name
 Address
 Gender
 Telephone Number

 Films:

Attributes:

 Title
 Film ID
 Film Type
 Release Date

 Customers:

Attributes:

 Name
 Address
 Telephone Number
 Costumer id
 Transactions:

Attributes:

TransactionID (Unique Identifier)

Rental Date

Return Date

Stage 2: Identify Relationships

1. Employee - Transaction Relationship:

 An Employee can be associated with multiple Transactions.

 A Transaction is associated with one Employee.

2. Film - Transaction Relationship:

 A Film can be part of multiple Transactions.

 A Transaction is associated with one Film.

3. Customer - Transaction Relationship:

 A Customer can have multiple Transactions.

 A Transaction is associated with one Customer.

Stage 3: Define Attributes

Employees:

 Name: String

 Address: String

 Gender: String

 Telephone Number: String

 Employee Code: String


Films:

 Film Code: String

 Title: String

 Film Type: String

 Release Date: Date

Customers:

 Customer Code: String

 Name: String

 Address: String

 Telephone Number: String

Transactions:

 Transaction Code: String

 Rental Date: Date

 Return Date: Date

Stage 4 : Create a manual ERD


TUGAS!
1. Buatlah rancangan sebuah database untuk toko online. Data-data yang akan ditanganinya adalah:

data pembeli atau customer, data produk, data order, data pembayaran dan data admin. Perlu

dicatat data transaksi pembelian seperti kode yang unik, tgl_pembelian, total_pembayaran.

Pembeli bisa membeli banyak barang dalam satu transaksi, produk bisa dibeli oleh banyak

pembeli. Perlu dicatat jumlah dan harga dari barang yang dibeli dalam satu transaksi pembelian.

Dalam pembelian juga perlu dicatat admin yang menangani pembelian. Setiap admin perlu dicatat

kode yang unik, nama, alamat, dan nomor_hp. Data pembeli yang perlu dicatat adalah kode yang

unik, nama, alamat, no_hp. Sedangkan data produk yang perlu dicatat adalah kode yang unik,

nama, satuan, harga, stok, dan keterangan. Buatlah ER Diagram manual untuk kasus tersebut dari

tahap 1 sampai 4!

 Answer!

 Tahab 1 :Determining Entities (Basic Objects):

Customer:

stores buyer data, with attributes customer_code (key), name, address and cellphone_no.

Product: stores product data, with attributes product_code (key), name, unit, price, stock and
description.

Order:

stores order data, with attributes order_code (key), purchase_date, and payment_total.

Payment:

stores payment data, with the payment_code (key) attribute.

Admin:

stores admin data, with admin_code (key), name, address and cellphone_number attributes.
 Tahab 2 : Determines the Attributes (Traits) of Each Entity:

• Customers

- customer_code (key attribute)

- name (simple attribute)

- address (simple attribute)

- cellphone_no(simple attribute)

• Products

- product_code (key attribute)

- name (simple attribute)

- unit (simple attribute)

- price (simple attribute)

- stock(simple attribute)

- description (simple attribute)

• Orders

- order_code (key attribute)

- purchase_date (simple attribute)

- total_payment (simple attribute)

• Payments

- payment_code (key attribute)

• Admin

- admin_code (key attribute)

- name (simple attribute)

- address (simple attribute)

- cellphone_number (simple attribute)


 Tahab 3 Determines the Relationship between Entities:
1.Customers and Orders

• Cardinality: One-to-Many (1:N)

• One customer can have many orders, but one order is associated with only one customer.

2.Products and Orders

• Cardinality: Many-to-Many (M:N)

• A single product can be in multiple orders, and a single order can contain multiple products.

3. Order and Payment

• Cardinality: One-to-One (1:1)

• Each order can only have one payment, and each payment relates to only one order.

4.Admin and Orders

• Cardinality: One-to-Many (1:N)

• One admin can handle multiple orders, but one order can only be handled by one admin.

 Tahab 4: Create a Manual ER Diagram:


2. Ambil contoh sembarang database, boleh dari sistem atau aplikasi yang sudah ada. Buatlah
rancangan ER Diagram manual database tersebut dari tahap 1-4 dengan ketentuan database
minimal mengandung 4 buah entitas.

Answer :
Digital Retail Platform

 Stage 1: Determining Entities (Basic Objects):

User: Represents the user of the Digital Retail Platform.

Product: Represents the product sold in the Digital Retail Platform.

Orders: Represents orders placed by the user.

Transaction: Represents financial transactions between users and Digital Retail Platform.

 Stage 2: Determines the Attributes (Traits) of Each Entity:

• User:

User ID (UserID)

Username (Username)

Email Address (Email)

Password (Password)

• Product:

Product ID (ProductID)

Product Name (ProductName)

Price

Description

• Orders:

Order ID (OrderID)

Order Date (OrderDate)

Amount (Quantity)

Total Price (TotalPrice)


• Transaction (Transaction):

Transaction ID (TransactionID)

Transaction Date (TransactionDate)

Transaction Type (TransactionType)

Amount.

 Stage 3: Determines the Relationship between Entities:

Relationship between Users and Orders: One user can place many orders (One-to-Many).

Relationship between Orders and Products: One order can consist of many products, and one product
can be in many orders (Many-to-Many).

Relationship between Users and Transactions: One user can carry out many transactions (One-to-Many).

Stage 4: Create a Manual ER Diagram

https://miro.com/app/board/uXjVNmcifQI=/?share_link_id=99843133839

Anda mungkin juga menyukai