O th smal cient s o verhea f of null special don t

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 't span disks •  Buffer management in DBMS requires ability to: –  pin a page in buffer pool, force a page to disk (important for implemen6ng concurrency control and recovery) –  adjust replacement policy, and pre ­fetch pages based on access pa\erns in typical DB opera6ons Record Formats: Fixed Length Record Formats: Fixed ­Length F1 F3 F4 L1 F2 L2 L3 L4 Base address (B) Address = B+L1 +L2 •  Informa6on about field types same for all records in a file; stored in system catalogs •  •  Information about field types same for all Finding r'th field requires scan of record ystem catalogs. reco i ds in a file; s tored in s DavisDB ing fi’xed ­fength records es sc an of record. Find uses i th lield r equir atabase Management Systems 3ed , R. Ramakrishnan and J. Gehrke Record Formats: Variable ­Length Record Formats: Variable Length •  Two aTwo alterfnative f(o rfields i(# xed): s is fixed): lterna6ve ormats # mats s fi field F1 4 Field Count F2 $ F3 $ F4 $ $ Fie lds Delim ited by Spec ial Symbo ls F1 F2 F3 F4 Array of Fie ld Offse ts * Second offers d irec t access to i’th fie ld, effic ien t sto rage •  Second s ffers direct ’access to liue) ;field, led irec to rytorage od. o 'th smal fficient s o verhea f of null (special don t know va nulls (special don't know value); small directory overhead Database Management Systems 3ed , R. Ramakrishnan and J. Gehrke 18 PaPage ormats: FFixed ­Length Records ge F Formats: ixed Length Records Slot 1 Slot 2 Slot 1 Slot 2 Free Space ... Slot N ... Slot N Slot M N PACKED * 1 . . . 0 1 1M number of records M ... 321 UNPACKED, BITMAP number of slots Record id = <page id, slot # >. In first •  Record id = <page id, slot #>. In first alterna6ve, moving al or free e, mov ng records hanges ecord records tfernativspace mianagement cfor free rspace id; may not be aanagemen t changes rid; may not be acceptable. m cceptable. Database Management Systems 3ed , R. Ramakrishnan and J. Gehrke 19 Page Formats: Variable ­Length Records Page Formats: Variable Length Records Rid = (i,N) Page i Rid = (i,2) Rid = (i,1) 20 N ... 16 2 SLOT DIR ECT OR Y 24 N 1 # slots Pointer to start of free space Can move records on page withou t changing rid; •  Can m,ove ractive for fix ed-without changing record id;...
View Full Document

Ask a homework question - tutors are online