Pembimbing : Nia Kumaladewi MMSI. - 197504122007102002 Kelas : 3C – Sistem Informasi Penulis : Nama NIM BAB 1 : Maulana Rifan Haditama (11190930000060) BAB II : Salman Yusuf (11190930000051) BAB III : M Ridho Alghifari (11190930000062) BAB IV : Muhammad Alvin Hilmy (11190930000056) BAB V : Yayi Puspita Sari (11190930000052) BAB VI : Aqshol Afifi (11190930000057) BAB VII : Figo Alsistani (11190930000054) BAB VIII : Hana Rahmaniah Sabila (11190930000058) BAB IX : Annisa Rosdiyana Editor : Maulana Rifan Haditama & Salman Yusuf Desain (11190930000059) : M. Ridho Alghifari ii
Puji syukur kami haturkan kehadirat Tuhan Yang Maha Esa, karena berkat rahmat serta karunia-Nya penyusunan modul Sistem Basis Data ini bisa terselesaikan dengan baik. Kami juga mengucapkan terima kasih kepada semua pihak yang telah mendukung dalam terselesaikannya modul ini. Di antaranya Ibu Nia Kumaladewi MMSI. selaku dosen mata kuliah Sistem Basis Data, serta teman-teman sekalian. Adapun tujuan dari penulisan dari modul ini adalah untuk memenuhi tugas mata kuliah Sistem Basis Data. Selain itu, modul ini juga bertujuan untuk menambah wawasan tentang Sistem Basis Data bagi para pembaca dan juga bagi penulis. Kami pun senantiasa menyadari bahwa masih terdapat kekurangan dalam modul ini. Baik dari segi penulisan maupun pembahasan. Oleh sebab itu, kami mengharapkan saran dan kritik yang bersifat konstruktif demi kebaikan di masa depan. 15 November 2020 Tim Penyusun iii
LEMBAR PENULIS ............................................................................................................................. ii KATA PENGANTAR .......................................................................................................................... iii DAFTAR ISI......................................................................................................................................... iv DAFTAR TABEL ................................................................................................................................ vi DAFTAR GAMBAR ........................................................................................................................... vii BAB I KONSEP DASAR...................................................................................................................... 9 1.1 Pendahuluan ................................................................................................................................ 9 1.2 Basis Data .................................................................................................................................. 10 1.3 Hirarki Data .............................................................................................................................. 10 1.4 Manfaat Basis Data ................................................................................................................... 11 1.5 Operasi Basis Data .................................................................................................................... 12 1.6 Persyaratan Basis Data ............................................................................................................. 13 1.7 Data Indepedency....................................................................................................................... 15 1.8 Integritas Data ........................................................................................................................... 16 BAB II SISTEM BASIS DATA ......................................................................................................... 19 2.1 Pengertian Sistem Basis Data ................................................................................................... 19 2.2 Komponen Sistem Basis Data .................................................................................................. 20 2.3 Abstraksi Data ........................................................................................................................... 22 2.4 Schema ....................................................................................................................................... 23 2.5 Bahasa Basis Data ..................................................................................................................... 24 BAB III DATABASE MANAGEMENT SYSTEMS ....................................................................... 30 3.1 Definisi dan Tujuan DBMS ...................................................................................................... 30 3.2 Komponen DBMS ..................................................................................................................... 32 3.3 Karakteristik DBMS ................................................................................................................. 32 3.4 Fungsi DBMS ............................................................................................................................ 34 3.5 Pengguna dalam DBMS ........................................................................................................... 36 3.6 Pengaplikasian DBMS di Berbagai Sektor ............................................................................. 37 3.7 Jenis-jenis DBMS ...................................................................................................................... 38 3.8 Kelebihan dan Kekurangan Penggunaan DBMS................................................................... 39 BAB IV MODEL DATA .................................................................................................................... 43 4.1 Pendahuluan .............................................................................................................................. 43 4.2 Varian relasi .............................................................................................................................. 46 4.3 Derajat relasi/kardinalitas ....................................................................................................... 48 iv
BAB V ENHANCED ENTITY RELATIONSHIP (EER) MODEL ............................................... 52 5.1 Pendahuluan .............................................................................................................................. 52 5.2 Definisi Enhaced Entity Relationship (EER) Model ............................................................... 52 5.3 Konsep Enhaced Entity Relationship (EER) ........................................................................... 53 5.4 Tujuan dan Manfaat Enhanced Entity Relationship (EER) Model ..................................... 59 5.5 Kelebihan dan Kekurangan Enhanced Entity Relationship (EER) Model ......................... 59 BAB VI MODEL DATA RELASIONAL DAN HAMBATAN DATA RELASIONAL ............... 63 6.1 Pengertian model data relasional ............................................................................................ 63 6.2 Konsep Model Data Relasional ................................................................................................ 63 6.3 Batasan Integritas Data Relasional(constraint) ..................................................................... 64 6.4 Operasi dalam Model Data Relasional.................................................................................... 66 6.5 Praktik Terbaik untuk Membuat Model Data Relasional .................................................... 68 6.6 Keuntungan dan kerugian menggunakan model data relasional ......................................... 68 BAB VII TRANSFORMASI MODEL DATA.................................................................................. 75 7.1 Komponen-komponen penyusun model ER ........................................................................... 75 7.2 Cara Membuat Entity Relationship Diagram ........................................................................ 77 7.3 Transformasi model data ke basis data fisik .......................................................................... 79 7.4 Teknis untuk melakukan tranformasi ERD ke dalam basis data fisik ................................ 79 7.5 IMPLEMENTASI HIMPUNAN ENTITAS LEMAH DAN SUB ENTITAS ...................... 81 BAB VIII NORMALISASI DATA .................................................................................................... 86 8.1 Normalisasi Data ....................................................................................................................... 86 8.2 Bentuk-bentuk Normalisasi Data ............................................................................................ 86 8.3 Konsep Ketergantungan ........................................................................................................... 89 8.4 Status Kunci .............................................................................................................................. 91 8.5 Dekomposisi ............................................................................................................................... 92 BAB IX PENERAPAN NORMALISASI .......................................................................................... 97 9.1 Teknik Normalisasi ................................................................................................................... 97 9.2 Bentuk tidak normal ................................................................................................................. 97 9.3 Bentuk 1NF ................................................................................................................................ 98 9.4 Bentuk 2NF ................................................................................................................................ 99 9.5 Bentuk 3NF .............................................................................................................................. 100 9.6 Pengujian Normalisasi ............................................................................................................ 102 DAFTAR PUSTAKA ........................................................................................................................... ix KESAN & PESAN PENULIS ............................................................................................................ xiv v
Tabel 3.1 Contoh pengaplikasian DBMS di berbagai sektor........................................ 38 Tabel 6.1 Batasan Utama ................................................................................................. 65 Tabel 8.1 Unnormalisasi ................................................................................................... 87 Tabel 8.2 First Normal Form ........................................................................................... 88 Tabel 8.3 Second Normal Form ....................................................................................... 88 Tabel 8.4 Third Normal Form ......................................................................................... 89 Tabel 8.5 Functional Dependency ................................................................................... 90 Tabel 8.6 Transitive Dependency .................................................................................... 90 Tabel 8.7 Trivial Dependency .......................................................................................... 91 Tabel 9.1 Unnormalisasi ................................................................................................... 98 Tabel 9.2 1NF .................................................................................................................... 98 Tabel 9.3 2NF .................................................................................................................... 100 Tabel 9.4 3NF .................................................................................................................... 101 Tabel 9.5 Pengujian Normalisasi ..................................................................................... 102 vi
Gambar 1.1 Basis Data dalam sebuah Hard Disk ......................................................... 10 Gambar 1.2 Hirarki Data ................................................................................................. 10 Gambar 1.3 Independency Data Dalam Arsitektur Tiga Level ................................... 16 Gambar 1.4 Integrity Referensial.................................................................................... 17 Gambar 2.1 Komponen Sistem Basis Data ..................................................................... 20 Gambar 2.2 Level abstraksi data .................................................................................... 22 Gambar 2.3 Contoh penulisan schema ........................................................................... 24 Gambar 3.1 Beberapa software DBMS yang populer di dunia .................................... 32 Gambar 4.1 Entity Relationship Diagram ...................................................................... 44 Gambar 4.2 Simbol-simbol ERD ..................................................................................... 46 Gambar 4.3 Unary Relation ............................................................................................. 47 Gambar 4.4 N-ary Relation.............................................................................................. 47 Gambar 4.5 Relasi 1 ke 1.................................................................................................. 48 Gambar 4.6 Relasi 1 ke N ................................................................................................. 48 Gambar 4.7 Relasi N ke 1 ................................................................................................. 48 Gambar 4.8 Relasi M ke N ............................................................................................... 49 Gambar 5.1 EER diagram menggambarkan subclass dan superclass ........................ 54 Gambar 5.2 Constraints Spesialisasi / Generalisasi....................................................... 55 Gambar 5.3 Perbedaan Tanda Completeness Constraints Total dan Partial............. 55 Gambar 5.4 Perbedaan Ciri Disjointness Constraints : Disjoint dan Overlap ........... 56 Gambar 5.5 Contoh Kategorisasi. ................................................................................... 57 Gambar 5.6 Contoh Agregasi EER Model. .................................................................... 57 Gambar 5.7 Contoh Agregat Skema ER......................................................................... 58 vii
Gambar 6.1 Tabel data ..................................................................................................... 64 Gambar 6.2 Batasan Integritas Referensial ................................................................... 66 Gambar 6.3 Insert ............................................................................................................. 67 Gambar 6.4 Update ........................................................................................................... 67 Gambar 6.5 Delete ............................................................................................................ 67 Gambar 6.6 Delete ............................................................................................................ 68 Gambar 7.1 Entitas ........................................................................................................... 75 Gambar 7.2 Atribut .......................................................................................................... 76 Gambar 7.3 Relasi Many to Many .................................................................................. 77 Gambar 7.4 Entity Relationship Diagram – Internet Sales Model .............................. 79 Gambar 7.5 Transformasi entitas menjadi sebuah tabel-tabel .................................... 80 Gambar 7.6 Transformasi entitas yang mempunyai drajat relasi 1-1......................... 80 Gambar 7.7 Transformasi entitas yang mempunyai drajat relasi N-1 ........................ 80 Gambar 7.8 Transformasi entitas yang mempunyai drajat relasi N-N ....................... 81 Gambar 7.9 Bentuk ERD dari suatu himpunan entitas lemah dan kuat .................... 81 Gambar 7.10 Bentuk Tabel yang terbentuk dari transformasi ERD pada gambar nomer 7 ....................................................................................................... 82 Gambar 7.11 Sub entitas dan super entitas .................................................................... 82 Gambar 8.1 Status Kunci ................................................................................................. 92 Gambar 8.2 Dekomposisi ................................................................................................. 93 Gambar 8.3 Anomali ........................................................................................................ 94 viii
KONSEP DASAR Learning Outcome: • Memahami hirarki data yang diuraikan tentang elemen data, record, dan file • Mengetahui persyaratan basis data • Memahami Independency data dan Integritas data 1.1 Pendahuluan Basis data (database) dapat dibayangkan sebagai sebuah lemari arsip. Jika kita memiliki lemari arsip dan bertugas mengelolanya, maka akan melakukan hal-hal seperti; memberi sampul, memberi nomor, lalu menempatkan arsip-arsip tersebut dengan urutan tertentu dalam lemari tersebut. Kalau berbicara basis data pada masing-masing table atau file sesuai dengan fungsinya, sehingga dengan mudah dapat melakukan penelusuran data yang diinginkan. Masalah yang dihadapi pada lemari arsip adalah kelambatan dalam menelusuri data yang ada pada lemari arsip tersebut, misalkan ingin mencari arsip untuk pegawai tertentu akan dihasilkan dengan lambat, dikarenakan petugas harus mencari lembaran-lembaran yang ada pada dokumen tersebut. Sedangkan kalau berbicara basis data, maka seluruh data disimpan dalam basis data pada masing-masing table atau file sesuai dengan fungsinya, sehingga akan dengan mudah dapat melakukan penelusuran data yang diinginkan, sehingga akan cepat mendapatkan informasi yang diperlukan. 9
Fleepit Digital © 2021