Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Slide DevCoach
Search
shabilla
April 11, 2024
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Slide DevCoach
DevCoach 125 : Back-End | Memperbaiki schema database dengan normalisasi
shabilla
April 11, 2024
More Decks by shabilla
See All by shabilla
Slide DevCoach #151
shabillarestu
0
81
Slide DevCoach
shabillarestu
0
84
Slide DevCoach
shabillarestu
0
52
Slide DevCoach
shabillarestu
0
64
Slide DevCoach
shabillarestu
0
62
Slide DevCoach
shabillarestu
0
65
Slide DevCoach
shabillarestu
0
50
Slide DevCoach
shabillarestu
0
55
Slide DevCoach
shabillarestu
0
66
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
470
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Exploring anti-patterns in Rails
aemeredith
4
520
Balancing Empowerment & Direction
lara
6
1.3k
Fireside Chat
paigeccino
43
4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
Product Roadmaps are Hard
iamctodd
55
13k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
600
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Technical Leadership for Architectural Decision Making
baasie
3
590
ラッコキーワード サービス紹介資料
rakko
1
5.2M
RailsConf 2023
tenderlove
30
1.6k
Transcript
None
None
Developer Coaching #122 • Mengenal autentikasi • Mengenal otorisasi •
Perbedaan autentikasi dan otorisasi • Implementasi autentikasi dan otorisasi pada REST API Back-End
Desain basis data yang tidak tepat menjadi masalah umum yang
menyebabkan performa database. ̶F̶u̶n̶ fact Back-End
Agenda • Mengenal anomali pada Database • Mengenal normalisasi Database
• Tahapan normalisasi Database Back-End
Anomali pada Database Back-End
Anomali Anomali adalah masalah yang terjadi akibat dari perubahan data
di database seperti insert, update, dan delete. Anomali ada 3 jenis yaitu insert, update, delete anomali. Back-End
Insert Anomali Back-End Back-End
Update Anomali Back-End Back-End
Delete Anomali Back-End Back-End
Dependensi (ketergantungan) Back-End
Dependensi Back-End Dependensi adalah hubungan antara suatu atribut dan nilai
atribut tersebut yang menentukan nilai atribut lainnya.
Jenis Dependensi Back-End • Dependensi fungsional • Dependensi fungsional sepenuhnya
• Dependensi total • Dependensi transitif
Dependensi fungsional Back-End Suatu atribut Y mempunyai dependensi fungsional terhadap
atribut X jika dan hanya jika setiap nilai X berhubungan dengan sebuah nilai Y. Notasi: X --> Y
Dependensi fungsional Back-End Contoh: ID -> Nama
Dependensi fungsional Back-End Contoh: NIK -> Nama
Dependensi fungsional sepenuhnya Back-End Dependensi fungsional sepenuhnya, jika: • Y
mempunyai dependensi fungsional terhadap X, • Y tidak memiliki dependensi terhadap bagian dari X.
Dependensi fungsional sepenuhnya Back-End Contoh: ID ITEM -> Harga ID
ITEM, ID SUPPLIER -> Harga
Dependensi fungsional sepenuhnya Back-End Contoh: NIM, ID Mata Kuliah ->
Nilai
Dependensi total Back-End Dependensi total, jika • Y memiliki dependensi
fungsional terhadap X dan • X memiliki dependensi fungsional terhadap Y. Notasi: X <-> Y
Dependensi total Back-End Contoh: ID SUPPLIER -> Nama Nama ->
ID SUPPLIER ID SUPPLIER <-> Nama
Dependensi total Back-End Contoh: NO KARYAWAN -> Nama Nama ->
NO KARYAWAN NO KARYAWAN <-> Nama
Dependensi transitif Back-End Suatu atribut Z dikatakan memiliki dependensi transitif
terhadap X, jika • Z memiliki dependensi fungsional terhadap Y dan • Y memiliki dependensi fungsional terhadap X. Notasi: X --> Y -> Z
Dependensi transitif Back-End Contoh: ID -> Nama -> Alamat
Dependensi transitif Back-End Contoh: NO KARYAWAN -> Nama -> Nama
Tim
Back-End nama_lengkap jabatan gaji nama_proyek Dimas Maulana Sales 5000000 Iklan
produk A, Iklan produk B, Iklan produk C Budi Customer Service 4000000 Survey produk A Gilang Ramadhan Sales Manager 5500000 Iklan produk B Back-End
Normalization (Normalisasi) Back-End
Normalisasi Normalisasi adalah teknik mendesain database untuk mengurangi redundancy dan
menghindari insert/update/delete anomaly. Back-End
Back-End Tahapan Normalisasi
1NF (First Normal Form) Back-End Aturan dari 1NF adalah: •
Setiap kolom tidak boleh memiliki nilai lebih dari satu.
Setelah tahap 1NF nama_lengkap jabatan gaji nama_proyek Dimas Maulana Sales
5000000 Iklan produk A Dimas Maulana Sales 5000000 Iklan produk B Dimas Maulana Sales 5000000 Iklan produk C Budi Customer Service 4000000 Survey produk A Gilang Ramadhan Sales Manager 5500000 Iklan produk B Back-End
2NF (Second Normal Form) Back-End Aturan dari 2NF adalah: •
Memenuhi kriteria 1NF • Semua kolom yang bukan merupakan suatu key (non-attributed key) harus bergantung secara penuh dengan satu primary key.
id_karyawan (pk) nama_lengkap jabatan gaji DCD0001 Dimas Maulana Sales 5000000
DCD0002 Budi Customer Service 4000000 DCD0003 Gilang Ramadhan Sales Manager 5500000 Tabel Karyawan Back-End Setelah tahap 2NF
Tabel Proyek id_proyek (pk) nama_proyek PR0001 Iklan produk A PR0002
Iklan produk B PR0003 Iklan produk C PR0004 Survey produk A Back-End
Tabel Proyek_Karyawan Id_karyawan (fk) Id_proyek (fk) DCD0001 PR0001 DCD0001 PR0002
DCD0001 PR0003 DCD0002 PR0004 DCD0003 PR0002 Back-End
3NF (Third Normal Form) Back-End Aturan dari 3NF adalah: •
Memenuhi kriteria 2NF • Tidak boleh ada kolom yang transitive functional dependencies
id_karyawan (pk) nama_lengkap id_jabatan DCD0001 Dimas Maulana ROLES0001 DCD0002 Budi
ROLES0002 DCD0003 Gilang Ramadhan ROLES0003 Tabel Karyawan Back-End
id_jabatan nama_jabatan gaji ROLES0001 Sales 5000000 ROLES0002 Customer Service 4000000
ROLES0003 Sales Manager 5500000 Tabel Jabatan Back-End
More.. more.. more.. Back-End
Feedback! Hadiah: • 2 Token Langganan Academy (30 Hari) *untuk
pengisi feedback terpilih! dicoding.id/devcoachfeedback
Thank You arasopraza
[email protected]
arasopraza Back-End arsyopraza