Storing Data - Disks and Files Flashcards
What does the physical scheme describe?
Files and Indexes used
What is the basic abstraction of data in DBMS? How are they located?
A file of records; a record ID can locate a record in a file
What is file organization and what are 3 types?
A method of arranging a file of records on external storage
Heap Files, Sorted Files, Indexes
What are the two types of external storage and the differences between them?
Disks: Random access at fixed coast; cheaper for block I/O
Tapes: only read pages in sequence, cheaper
What are the 3 components of the architecture?
- File and index layers make calls to buffer manager
- Buffer manager stages pages from external storage to main memory buffer pool
- Disk Manager keeps track of pages used by files, and empty slots on pages
What is a heap file and when is it used?
Random ordering file suitable when typical access is a file scan retrieving records
What is a sorted file and when is it used?
Best if records must be retrieved in some order, or when a range of records is needed; file sorted on some value
What is an index ?
A data structure used to organize records via trees or hashing
- speeds up searches based on key value; faster updates in index
What is the main advantage of disk or tape?
Random access instead of sequential
In what units are data stored and retrieved on disk?
Blocks Or Pages
Why doesn’t DBMS use OS disk manager?
- portability
- too small files
- OS files cannot span disk devices
What is a buffer pool?
Collection of pages in main memory
What is a frame?
Page in a buffer pool
What is “pinning”
Locking/increment a counter for memory waits/accesses
What is sequential flooding?
Using LRU + repeating sequential scans causing significant page faults; when buffer frames