【正文】
Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. VariableLength Records (Cont.) ? 定長 的實現(xiàn) Fixedlength representation: ? reserved space 保留空間 ? Pointers 指針 ? 保留空間 Reserved space – 暫時不用的 空著 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Physical Storage Media (Cont.) ? Optical storage 光存儲 ? nonvolatile, data is read optically from a spinning disk using a laser 非易逝 ? CDROM (640 MB) and DVD ( to 17 GB) most popular forms ? Writeone, readmany (WORM) optical disks used for archival storage (CDR and DVDR) ? Multiple write versions also available (CDRW, DVDRW, and DVDRAM) ? slower than with magic disk ? Jukebox systems, 多個可移動盤 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Physical Storage Media ? Cache – fastest and most costly form of storage。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. File Organization ? The database is stored as a collection of files. Each file is a sequence of records. A record is a sequence of fields. ? One approach: ?assume record size is fixed ?each file has records of one particular type only ?different files are used for different relations This case is easiest to implement。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. Chapter 11: Storage and File Structure 小結(jié) ? Overview of Physical Storage Media 物理存儲介質(zhì) ? Magic Disks 磁盤 ? RAID 磁盤陣列 ? Tertiary Storage 第三存儲 ? Storage Access 存取 ? File Organization 文件結(jié)構(gòu) ? Organization of Records in Files 記錄結(jié)構(gòu) ? DataDictionary Storage 數(shù)據(jù)字典 。Silberschatz, Korth and Sudarshan Database System Concepts 5th Edition, Oct 23, 2022. BufferReplacement Policies ? Most operating systems replace the block least recently used (LRU strategy) ? Idea behind LRU – use past pattern of block references as a predictor of future references ? Queries have welldefined access patterns (such as sequential scans), and a database system can use the information in a user’s query to predict future references ? LRU can be a bad strategy for certain access patterns involving repeated scans of data ? For example: when puting the join of 2 relations r and s by a nested loops for each tuple tr of r do for each tuple ts of s do if the tuples tr and ts match … ? Mixed strategy with hints on replacement strategy provided by the query optimizer is preferable 169。Silberschatz, Korth and Sudarshan Database System Concepts 5th