【正文】
Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Multitable Clustering File Organization Store several relations in one file using a multitable clustering file anization 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Free Lists(空閑列表) ? Store the address of the first deleted record in the file header. ? Use this first record to store the address of the second deleted record, and so on ? Can think of these stored addresses as pointers since they ―point‖ to the location of a record. ? More space efficient representation: reuse space for normal attributes of free records to store pointers. (No pointers stored in inuse records.) 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Magic Hard Disk Mechanism NOTE: Diagram is schematic, and simplifies the structure of actual disk drives 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Physical Storage Media ? Main memory: 主存儲 ? fast access (10s to 100s of nanoseconds。Database System Concepts, 5th Ed. Chapter 11: Storage and File Structure 169。 1 nanosecond = 10–9 seconds) 10納秒 ? generally too small (or too expensive) to store the entire database 不能存整個 DB ? capacities of up to a few Gigabytes widely used currently ? Capacities have gone up and perbyte costs have decreased steadily and rapidly (roughly factor of 2 every 2 to 3 years) ? Volatile — contents of main memory are usually lost if a power failure or system crash , 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Storage Access(存儲訪問) ? A database file is partitioned into fixedlength storage units called blocks. Blocks are units of both storage allocation and data transfer. ? Database system seeks to minimize the number of block transfers between the disk and memory. We can reduce the number of disk accesses by keeping as many blocks as possible in main memory. ? Buffer – portion of main memory available to store copies of disk blocks. ? Buffer manager – subsystem responsible for allocating buffer space in main memory. 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. VariableLength Records ? Variablelength records arise in database systems in several ways: ? Storage of multiple record types in a file. ? Record types that allow variable lengths for one or more fields. ? Record types that allow repeating fields (used in some older data models). 169。Silberschatz, Korth and Su