1 / 19

Organisasi File Sequential

Organisasi File Sequential. Sequential File. Sequential Access. File Sequential. Adanya keberurutan record – record di dalam file menurut kriteria  Ordered File Karakteristik : Record berisi semua nilai atribut dengan posisi yang sama .

esma
Download Presentation

Organisasi File Sequential

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Organisasi File Sequential

  2. Sequential File File Sequential

  3. Sequential Access File Sequential

  4. File Sequential • Adanyakeberurutan record – record didalam file menurutkriteria Ordered File • Karakteristik : • Record berisisemuanilaiatributdenganposisi yang sama. • Adanyaaturan / kriteriatertentu yang menjadikuncipengurutan data. Kuncibersifatunik. • Umumnyaterdapatpada media yang lama (cards, tapes). • Secarafisik, record diurutkanberdasarkankunci primary. • Tidakdapat direct access terhadap record yang diinginkan. • Pencariansekuensialsampai record ditemukan. • Pencarianbinerdigunakanuntukmempercepatakses (harusdiketahuiukuran file danposisitengah file). File Sequential

  5. File Sequential • Namaatributtidakperluditulispadasetiap record, tapimunculpada file header. • Denganadanyakonstrainsekuensdan record tetapmakaterjadipeningkatanefisiensi, tetapiadapenurunanfleksibilitas. • Record – record harusdijagaberdasarkanatributkunci. • Penyisipandilakukandiakhir file ataudi slot kosongakibatpenghapusan record. File Sequential

  6. File Sequential • Penyisipandilakukandenganmenggunakan file transaction log. Jikaukuran file log sudahcukupbesar, makadilakukanreorganisasi. • Secaraperiodikdilakukan merge antara file log dan file utama / master file. • Komponen : • File utama • File transaction log  berupastruktur Pile File Sequential

  7. Penyisipan Record • Penyisipan • Lambat • Pencarian sequential untukmencariposisi yang akanditempati record. • Jikaadatempat yang cukuppadahalaman yang dicari, makatulis record. • Jikatidakcukuptempat, makaakandipindahkansejumlah record kehalamanberikutnya. • Jikatidakadatempat yang kosong, makaakandilakukanpenyusunan yang berulang-ulangsampaiditemukantempat yang cukup. • Dapatmenggunakan “overflow” untukmempersingkatwaktu. File Sequential

  8. ModifikasidanPenghapusan Record • Modifikasi • Lambat • Pencarian sequential • Melakukanmodifikasi • Penulisanulang record • Penghapusan • Lambat • Pencarian sequential • Memberitandapada record ataumengosongkantempatdari record yang dihapus • Penulisanulang record File Sequential

  9. Kinerja File Sequential • R = a. V a : Jumlahatributpada 1 record V : Panjang rata – rata nilaiatribut (byte) • Fetch Record (TF) • Pencarianmenggunakanatribut non-kunci • Belumada file log  rata – rata ½ file akanditelusuri TF = ½ waktupencarianseluruhblok TF = ½ b. B / t’ = ½ n R / t’ • Sudahada file log TFo = ½ o R / t’ TF = ½ (n + o) R / t’ File Sequential

  10. Kinerja File Sequential • Fetch Record (TF) • Pencarianmenggunakanatributkunci (pencarianbiner) • Belumterbentuk log TF = 2log (b) (s + r + btt + c) TF = 2log (n / Bfr) (s + r + btt + c) • Sudahterbentuk log TF = 2log (n / Bfr) (s + r + btt + c) + TFO TF = 2log (n / Bfr) (s + r + btt + c) + ½ o (R / t’) • Waktuuntukmendapatkan 1 record berikutnya (TN) TN = waktu transfer 1 blok x peluangditemukannya record dalamblok yang sama TN = btt / Bfr = R / t File Sequential

  11. Kinerja File Sequential • Waktupenyisipan record baru (TI) • Cari, geser, sisip TI = TF + ½ (n / Bfr) (btt + TRW) • Memakai log file TI = s + r + TRW + (TY / o) • Waktu Update (TU) • Bukankunci TU = TF + TRW • Terhadapkunci : cari record, hapus record, sisipkan record TU = TF (main) + TI (file log) File Sequential

  12. Kinerja File Sequential • Waktupembacaanseluruh record (TX) TX = Tsort (o) + (n + o) R / t’ • Waktureorganisasi File (TY) TY = Tsort (o) + nold (R / t’) + o (R / t’) + nnew (R / t’) TY = Tsort (o) + 2 (n + o) (R / t’) • Tsort (o) = 2log (o / btt) File Sequential

  13. Soal Latihan • Diketahui file sequential : • Putaran disk = 8000 rpm • Seek time (s) = 5 ms = 0,005 s • Transfer rate (t) = 2048 byte/s • TRW = 2r • Ukuran blok (B) = 4096 byte • Ukuran pointer blok (P) = 8 byte • IBG (G) = 1024 byte • Jumlah record pada file (n) = 100000 record • Jumlah field (a) = 8 field • Panjang nilai (V) = 25 byte • Jumlah record file log (o) = 5000 record • Waktu pemrosesan (c) = 2 ms = 0,002 s File Sequential

  14. Soal Latihan • Hitung : R, TF, TN, TI, TU, TX, TY jika metode blocking : • Fixed • Variable-length spanned • Variable-length unspanned File Sequential

  15. Pembahasan Soal Latihan Metode Fixed Blocking • R = a. V = 8. 25 = 200 byte • TF (Non Kunci ) = ½ (n + o) R / t’ Bfr = B / R = 4096 / 200 = 20,48 = 20 record W = G / Bfr = 1024 / 20 = 51 byte t’ = (t / 2) (R / (R + W)) = (2048 / 2) (200 / (200 + 51)) = 1024 (0,797) = 815,94 s TF = ½ (n + o) R / t’ = ½ (100000 + 5000) (200 / 815,94) = 52500 (0,245) = 12868,59 s File Sequential

  16. Pembahasan Soal Latihan • TF (Kunci) = 2log (n / Bfr) (s + r + btt + c) + TFO r = (60 . 1000) / (2 rpm) = 60000 / (2. 8000) = 3,75 ms = 0,00375 s btt = B / t = 4096 / 2048 = 2 s TFo = ½ o R / t’ = ½ (5000) (200 / 815,94) = 612,79 s TF = 2log (n / Bfr) (s + r + btt + c) + TFO = 2log (100000 / 20) (0,005 + 0,00375 + 2 + 0,002) + 612,79 = 2log (5000) (2,01075) + 612,79 = 12,29 (2,01075) + 612,79 = 637,5 s • TN = btt / Bfr = 2 / 20 = 0,1 s File Sequential

  17. Pembahasan Soal Latihan • TI = s + r + TRW + (TY / o) Tsort (o) = 2log (o / btt) = 2log (5000 / 2) = 11,29 s TY = Tsort (o) + 2 (n + o) (R / t’) = 11,29 + 2 (100000 + 5000) (200 / 815,94) = 11,29 + 210000 (0,245) = 51461,29 s TI = s + r + TRW + (TY / o) = 0,005 + r + 2r + (51461,29 / 5000) = 0,005 + 3r + 10,29 = 0,005 + 3 (0,00375) + 10,29 = 10,31 s • TU (Non Kunci) = TF + TRW = 12868,59 + 2 (0,00375) = 12868,6 s File Sequential

  18. Pembahasan Soal Latihan • TU (Kunci) = TF (main) + TI (file log) TF (main) = 2log (n / Bfr) (s + r + btt + c) = 2log (100000 / 20) (0,005 + 0,00375 + 2 + 0,002) = 2log (5000) (2,01075) = 24,71 s TU = TF (main) + TI (file log) = 24,71 + 10,31 = 35,02 s • TX = Tsort (o) + (n + o) R / t’ = 11,29 + (100000 + 5000) (200 / 815,94) = 11,29 + 105000 (0,245) = 25736,29 s • TY = 51461,29 s File Sequential

  19. Pembahasan Soal Latihan • Lanjutkan penyelesaian latihan dengan metode Variable-Length Spanned dan Variable-Length Unspanned File Sequential

More Related