Jobsheet 2 Basic Data
Jobsheet 2 Basic Data
Jobsheet 2 Basic Data
Nim : ( 2341720203)
N.a : 12
Class : TI_I1
Jobsheet-2:
Entity Relationship Diagram (ERD) Mata Kuliah Basis Data
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!
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:
Admin:
stores admin data, with admin_code (key), name, address and cellphone_number attributes.
➢ Tahab 2 : Determines the Attributes (Traits) of Each Entity:
• Customers
- cellphone_no(simple attribute)
• Products
- stock(simple attribute)
• Orders
• Payments
• Admin
• One customer can have many orders, but one order is associated with only one customer.
• A single product can be in multiple orders, and a single order can contain multiple products.
• Each order can only have one payment, and each payment relates to only one order.
• One admin can handle multiple orders, but one order can only be handled by one admin.
rancangan ER Diagram manual database tersebut dari tahap 1-4 dengan ketentuan database
Answer :
Digital Retail Platform
Transaction: Represents financial transactions between users and Digital Retail Platform.
• User:
User ID (UserID)
Username (Username)
Password (Password)
• Product:
Product ID (ProductID)
Price
Description
• Orders:
Order ID (OrderID)
Amount (Quantity)
Transaction ID (TransactionID)
Amount.
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).
https://miro.com/app/board/uXjVNmcifQI=/?share_link_id=99843133839