DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 1
StoringData:DisksandFiles
Chapter7
“Yea,fromthetableofmymemory I’llwipeawayalltrivialfondrecords.”
- - Shakespeare,Hamlet
DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 2
DisksandFiles
- DBMSstoresinformationon(“hard”)disks.
- ThishasmajorimplicationsforDBMSdesign!
READ:transferdatafromdisktomainmemory(RAM).
✁WRITE:transferdatafromRAMtodisk.
✁Botharehigh-costoperations,relativetoin-memory
- perations,somustbeplannedcarefully!
DatabaseManagementSystems3ed,R. Ramakrishnan andJ.Gehrke 3
WhyNotStoreEverythinginMainMemory?
- Coststoomuch.$1000willbuyyoueither
128MBofRAMor7.5GBofdisktoday.
- Mainmemoryisvolatile.Wewantdatatobe
savedbetweenruns.(Obviously!)
- Typicalstoragehierarchy: