Download presentation
Presentation is loading. Please wait.
1
Manajemen Basis Data Pertemuan 2 Matakuliah: M0264/Manajemen Basis Data Tahun: 2008
2
Bina Nusantara Disks Files Objectives
3
Bina Nusantara Disks And Files DBMS stores information on (“hard”) disks. This has major implications for DBMS design! – READ: transfer data from disk to main memory (RAM). – WRITE: transfer data from RAM to disk. – Both are high-cost operations, relative to in-memory operations, so must be planned carefully.
4
Bina Nusantara Disks Secondary storage device of choice. Main advantage over tapes: random access vs. sequential. Data is stored and retrieved in units called disk blocks or pages. Unlike RAM, time to retrieve a disk page varies depending upon location on disk. – Therefore, relative placement of pages on disk has major impact on DBMS performance!
5
Bina Nusantara Disks Components of a Disk
6
Bina Nusantara The most important external storage devices. They allow us to retrieve any page at (more or less) fixed cost per page. However, if we read several pages in the order that they are stored physically, the cost can be much less that the cost of reading the same pages in random order Space on disk is managed by the disks space manager. Disks
7
Bina Nusantara Files The file of records is an important abstraction in a DBMS and implemented by the files and access methods layer of code. A file can be created, destroyed, and have records inserted into and deleted from it. It also supports scans. A scan operation allows us to step through all the records in the file one at the time. A relation is typically stored as a file of records
8
Bina Nusantara Files The files layer stores the records in a file in a collection of disk pages. It keeps track of pages allocated to each file and as records are inserted into and deleted from the file, it also tracks available space within pages allocated to the file.
9
Bina Nusantara Files of Records Page or block is OK when doing I/O, but higher levels of DBMS operate on records, and files of records. FILE : A collection of pages, each containing a collection of records. Must support: – insert/delete/modify record – read a particular record (specified using record id) – scan all records (possibly with some conditions on the records to be retrieved)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.