Sistem Basis Data Lanjut REVIEW SISTEM BASIS DATA
Sistem Basis Data Lanjut REVIEW SISTEM BASIS DATA TERDISTRIBUSI DAN DISTRIBUTED DATABASE MANAGEMENT SYSTEM
KONSEP DAN RANCANGAN BASIS DATA TERDISTRIBUSI
DEFINISI Basis Data Terdistribusi adalah “Kumpulan data logic yang saling berhubungan secara fisik terdistribusi dalam jaringan komputer, yang tidak tergantung dari program aplikasi sekarang maupun masa yang akan datang” File merupakan kumpulan data yang dirancang untuk suatu aplikasi atau sekumpulan aplikasi yang dekat hubungannya.
Contoh Basis Data Terdistribusi Misalnya : Sebuah bank yang memiliki banyak cabang, bahkan di sebuah kota bisa terdiri dari beberapa cabang/kantor. Masing-masing lokasi memiliki jaringan local sendiri, dan semua jaringan local itu dihubungkan satu sama lain membentuk sebuah jaringan nasional.
Struktur Basis Data Terdistribusi Sebuah sistem basis data terdistribusi hanya mungkin dibangun dalam sebuah sistem jaringan komputer. Topologi Jaringan A. Topologi bintang (Star) B. Topologi Cincin (Ring) C. Topologi Bus
Struktur Basis Data Terdistribusi Perbedaan utama diantara berbagai topologi di atas terletak pada: A. Biaya Instalasi Biaya dalam membangun hubungan link antar simpul B. Biaya Komunikasi Waktu dan biaya dalam pengoperasioan sistem berupa pengiriman data dari satu simpul ke simpul lain
Struktur Basis Data Terdistribusi C. Kehandalan ◦ Frekuensi/tingkat kegagalan komunikasi yang terjadi D. Ketersediaan ◦ Tingkat kesiapan data yang dapat diakses sebagai antisipasi kegagalan komunikasi
Jenis Transaksi Lokal ◦ Transaksi yang mengakses data pada suatu simpul (mesin/server) yang sama dengan simpul dari mana transaksi tersebut dijalankan Transaksi Global ◦ Transaksi yang membutuhkan pengaksesan data di simpul yang berbeda dengan simpul dimana transaksi tersebut dijalankan, atau transaksi dari sebuah simpul yang membutuhkan pengaksesan data ke sejumlah simpul lainnya.
Ciri Basis Data Terdistribusi A. Data disimpan di sejumlah tempat B. Prosessor pada tempat yang berbeda tersebut dihubungkan dengan jaringan komputer C. Sistem basis data terdistribusi bukan terdiri dari sekumpulan file yang berada pada berbagai tempat tetapi pada sebuah basis data di berbagai tempat D. Setiap tempat secara mandiri memproses permintaan user yang membutuhkan akses ke data di tempat tersebut dan juga mampu untuk memproses data yang tersimpan di tempat lain.
Keuntungan yang diberikan oleh sistem basis data terdistribusi A. Pengelolaan secara transparan data yang terdistribusi B. Mengacu pada struktur organisasi C. Meningkatkan untuk berbagi dan otonomi lokal D. Meningkatkan ketersediaan data E. Meningkatkan kehandalan F. Meningkatkan performasi kerja G. Memudahkan pengembangan sistem
Kerugian yang diberikan sistem basis data terdistribusi A. Kompleksitas manajemen B. Kontrol integritas lebih sulit C. Biaya pengembangan D. Keamanan E. Sulitnya standarisasi F. Menambah kebutuhan penyimpanan G. Lebih sulit dalam mengatur lingkungan data
DESAIN Relasional BASIS DATA TERDISTRIBUSI Ada beberapa pendekatan yang berkaitan dengan penyimpanan data/tabel dalam sebuah sistem basis data terdistribusi, yaitu 1. Replikasi 2. Fragmentasi 3. Replikasi dan Fragmentasi
DESAIN Relasional BASIS DATA TERDISTRIBUSI 1. Replikasi Sistem memelihara sejumlah salinan/duplikat tabel-tabel data Setiap salinan tersimpan dalam simpul yang berbeda, yang menghasilkan replikasi data
DESAIN Relasional BASIS DATA TERDISTRIBUSI 2. Fragmentasi Data dalam tabel dipilah dan disebar ke dalam sejumlah fragmen. Tiap fragmen disimpan di sejumlah simpul yang berbeda. Fragmentasi dapat berbentuk fragmentasi horizontal (pemilahan record data) atau fragmentasi vertikal pemilahan field/atribut data)
DESAIN Relasional BASIS DATA TERDISTRIBUSI 3. Replikasi dan Fragmentasi Merupakan kombinasi dari replikasi dan fragmentasi. Data/tabel dipilah dalam sejumlah fragmen. Sistem lalu mengelola sejumlah salinan dari masing fragmen tadi di sejumlah simpul.
Replikasi Data Keuntungan : 1. Ketersediaan yang tinggi. 2. Peningkatan Keparalelan (Increased paralelism) 3. Peningkatan beban pengubahan data (Increased overhead on upate)
Fragmentasi Data Dapat diterapkan operasi union ataupun operasi natural join. Contoh : Tabel nasabah bank dengan struktur dan data sebagai berikut : nasabah = (no_nas, nama_nas, alamat_nas, kota, saldo_simpan, saldo pinjam)
Fragmentasi Data Tabel Nasabah No_nas Nama_nas Alamat Kota Saldo_simpan Saldo_pinja m 2001001 Jamaludin Jl. Suci 10 Medan 100000 0 2001002 Nurhaliza Jl. Abdi 22 Medan 2300000 1450000 2001003 Nur Alam Jl. Aceh 10 Medan 1200000 3500000 2001004 Setia Jl. Jawa 112 Medan 1500000 1000000 2002001 Tini Jl. Adil 20 Padang 50000 0 2002002 Ahmad Jl. Taat 12 Padang 750000 0 2002003 Wisnu Jl Damai 11 Padang 2600000 5000000 2002004 Alif Jl. Mulia 1 Padang 100000 12000000
Fragmentasi Data Fragmentasi Horizontal Dianalogikan sebagai Record dalam database (Gabungan [union]) nasabah 1 = kota=‘Medan’ (nasabah) nasabah 2 = kota=‘Padang’ (nasabah)
Fragmentasi Data – Horizontal Akan diperoleh 2 buah fragemen o Fragmen Nasabah 1 o Fragmen Nasabah 2 Terapkan operasi union nasabah = nasabah 1 nasabah 2
Fragmentasi Data Fragmentasi Vertikal dianalogikan sebagai field nasabah 1 = no_nas, nama_nas, alamat, kota (nasabah) nasabah 2 = no_nas, saldo_simpan (nasabah) nasabah 3 = no_nas, saldo_pinjam (nasabah)
Fragmentasi Data Replikasi dan Fragmentasi Upaya untuk replikasi dan fragmentasi data dapat dilakukan sekaligus pada sebuah tabel, yaitu dengan mereplikasi fragmen-fragmen yang telah terbentuk. Misalnya, dalam sebuah sistem terdistribusi terdapat 5 buah simpul S 1, S 2, S 3, S 4 dan S 5. Kita dapat memilah tabel nasabah sesuai dengan kota dimana nasabah mengajukan permohonan menjadi nasabah 1, nasabah 2 dan nasabah 3. Kemudian dengan pertimbangan tertentu, fr agmen nasabah 1 disimpan di simpul S 1, S 2 dan S 3. lalu fragmen nasabah 2 disimpan disimpul S 3 dan S 4 dan fragmen nasabah 3 disimpan di simpul S 1 dan S 3.
DESAIN Relasional BASIS DATA TERDISTRIBUSI Dalam sumber lain disebutkan bahwa factor-factor yang dianjurkan untuk digunakan pada basis data terdistribusi yaitu : 1. Fragmentasi 2. Alokasi 3. Replikasi
DESAIN Relasional BASIS DATA TERDISTRIBUSI 1. Fragmentasi Sebuah relasi yang terbagi menjadi beberapa sub-sub relasi yang disebut dengan fragment, sehingga disebut juga distribusi. Ada dua buah fragmentasi, yaitu horizontal dan vertical.
DESAIN Relasional BASIS DATA TERDISTRIBUSI 2. Alokasi Setiap fragmen disimpan pada situs dengan distribusi yang optimal
DESAIN Relasional BASIS DATA TERDISTRIBUSI 3. Replikasi DDBMS dapat membuat suatu copy dari fragmen pada beberapa situs yang berbeda
Horizontal Fragmentasi Contoh : Diasumsikan hanya mempunyai dua tipe properti yaitu tipe flat dan rumah, horisontal fragmentasi dari properti untuk di sewa dari tipe properti dapat di peroleh sebagai berikut : P 1 : tipe = 'Rumah'( properti sewa) P 2; tipe = 'Flat'(properti sewa) Hasil dari operasi tersebut akan memiliki dua fragmentasi , yang satu terdiri dari tipe yang mempunyai nilai 'Rumah' dan yang satunya yang mempunyai nilai "Flat'.
Horizontal Fragmentasi Fragment P 1 Pno Street Area City Pcode Type Rooms Rent Cno Sno Bno PA 14 16 Holl Dee Aber AB 75 S Rumah 6 650 CO 46 SA 9 B 7 PG 21 18 Dell Hynd Glas G 12 Rumah 4 500 CO 87 SG 37 B 3 Area Dee Hynd Part City Aber Glas Rooms 4 4 3 Rent 450 400 300 Cno CO 67 CO 70 CO 90 Sno SL 41 SG 14 Bno B 5 B 3 Fragment P 2 Pno PL 94 PG 16 Street 6 Arg 8 Law 2 Man Pcode AB 74 S G 50 G 67 Type Flat
Vertikal Fragmentasi contoh : Aplikasi Payroll untuk PT. Dream Home membutuhkan nomor pokok daari Staff ( Sno) dan Posisi, Sex, DOB, Gaji dan NIN atribut setiap anggota dari staff tersebut; departemen kepegawaian membutuhkan ; Sno, Fname, Lname, Alamat, Tel_no dan Bno atribut, Vertikal fragmentasi dari staff untuk contoh ini diperlukan sebagai berikut : S 1 = Sno, posisi, sex, dob, gaji, nin(Staff) S 2 = Sno, Fname, Lname, Alamat, Tel_no, Bno(Staff)
Akan menghasilkan dua buah fragmen , kedua buah fragmen tersebut berisi kunci utama ( Sno ) untuk memberi kesempatan yang aslinya untuk di rekonstruksi. Keuntungan dari vertikal fragmentasi ini yaitu fragmen-fragmen tersebut dapat disimpan pada situs yang memerlukannya. Sebagai tambahan kinerja yang di tingkatkan, seperti fragmen yang diperkecil di bandingkan dengan yang aslinya.
Vertikal Fragmentasi ini sesuai dengan skema kepuasan pada aturan pembetulan (Correcness Rules): 1. Kelengkapan : Setiap atribut di dalam relasi staff muncul pada setiap fragment S 1 dan S 2 2. Rekonstruksi ; relasi staff dapat di rekonstruksi dari fragmen menggunakan operasi natural join, yakni : S 1 S 2 = Staff 3. Penguraian : Fragmment akan diuraikan kecuali kunci utama, karena diperlukan untuk rekonstruksi
Vertikal Fragmentasi Fragment S 1 Fragment S 2 Sno Posisi Sex DOB Salary NIN SL 21 Manager M 1 -oct-60 300000 WK 44201 B SG 37 SG 14 Snr Ass Deputy F M 10 -nov-65 24 -mar-70 150000 WL 43251 C 100000 WL 22065 B SA 9 Assistant F 20 -jan-70 Sno SL 21 SG 37 SG 14 SA 9 Fname John Ann David Marie Lname White Beech Ford Howe Alamat 19 Taylor London 81 George Glasgow 63 Ashby Glasgow 2 Elm Abeerdeen 90000 WM 53218 D Tel_no 0171 -884 -5112 0141 -848 -3345 0141 -339 -2177 Bno B 5 B 3 B 7
DISTRIBUTED DATABASE MANAGEMENT SYSTEM
DEFINISI Sebuah sistem perangkat lunak yang mengatur basis data terdistribusi dan membuat pendistribusian data secara transparan. DDBMS memiliki satu logikal basis data yang dibagi ke dalam beberapa fragment. Dimana setiap fragment disimpan pada satu atau lebih komputer dibawah kontrol dari DBMS yang terpisah , dengan mengkoneksi komputer menggunakan jaringan komunikasi.
DDBMS Masing- masing site memiliki kemampuan untuk mengakses permintaan pengguna pada data lokal dan juga mampu untuk memproses data yang disimpan pada komputer lain yang terhubung dengan jaringan. Pengguna mengakses basis data terdistribusi dengan menggunakan dua aplikasi yaitu aplikasi lokal dan aplikasi global, sehingga DDBMS memiliki karakteristik yaitu :
Karakteristik DDBMS A. Kumpulan dari data logic yang digunakan bersama-sama B. Data di bagi menjadi beberapa fragment c. Fragment /replica nya dialokasikan pada yang digunakan D. Fragment mungkin mempunyai copy (replica) E. Setiap site berhubungan dengan jaringan komunikasi F. DBMS pada masing-masing site dapat mengatasi aplikasi local, secara otonomi G. Data pada masing-masing site di bawah pengawasan DBMS H. Masing-masing DBMS berpartisipasi paling tidak satu global aplikasi
Gambar Manajemen Sistem Basis Data Yang Terdistribusi
Distributed Database Management System Dari definisi tersebut , sistem diharapkan membuat suatu distribusi yang transparan. Basis data terdistribusi terbagi menjadi beberapa fragment yang disimpan di beberapa komputer dan mungkin di replikasi, dan alokasi penyimpanan tidak diketahui pengguna. Adanya Transparansi di dalam basis data terdistribusi agar terlihat sistem ini seperti basis data tersentralisasi. Hal Ini mengacu pada prinsip dasar dari DBMS (Date, 1987 b). Transparansi memberikan fungsional yang baik untuk pengguna tetapi sayangnya mengakibatkan banyak permasalahan yang timbul dan harus diatasi oleh DDBMS.
Pemrosesan Distribusi Definisi : Basis data tersentralisasi yang dapat diakses di semua jaringan komputer Point utama dari definisi basis data terdistribusi adalah sistem terdiri data yang secara fisik di distribusikan pada beberapa site yang terhubung dengan jaringan. Jika data nya tersentralisasi walaupun ada pengguna lain yang mengakses data melewati jaringan, hal ini bukan disebut dengan DDBMS melainkan pemrosesan secara distribusi.
Gambar Pemrosesan Terdistribusi
- Slides: 41