90 likes | 108 Views
RUM Conjecture of Database Access Method. Database Access Method. Defines how to store and access data in a database system Heap file Sorted file B+ Tree index Hash Index …. Requirements of A Good Access Method. Read optimized how much time it cost to read the data
E N D
DatabaseAccessMethod • Defineshowtostoreandaccessdatainadatabasesystem • Heapfile • Sortedfile • B+Treeindex • HashIndex • …
RequirementsofAGoodAccessMethod • Readoptimized • howmuchtimeitcosttoreadthedata • e.g.,rangesearch,equalitysearch • Updateoptimized • howmuchtimeitcosttoupdatethedata • e.g.,insert,delete,update • Memory(Space)optimized • howmuchspaceitusestostorethedata • e.g.,auxiliarystructures,duplicates
However… RUMConjecture • RUMConjecture:Anaccessmethodthatcanminimizetwooutoftheread,update,andmemoryoverheads,cannotoptimizethethirdoverhead! • Inotherwords,theremightnotbethe“best”accessmethodthatisoptimalforallthethreerequirements!
Example:Append-OnlyLog • Readunoptimized • Asearchmayneedtoscantheentirelog • Spaceunoptimized • Whendelete/updateanentry,oldentryisnotdeletedin-place • Updateoptimized • Eachupdatesimplyappendtheentrytothelog
Example:B+Tree • Readoptimized: • EachsearchonlyvisitslogB(N)pages • Updateunoptimized: • AnupdaterequiresvisitingatleastlogB(N)pages • Spaceunoptimized: • Pagesoftenarenotfull
Example:HashIndex • Readoptimized: • AquerysimplychecksO(1)bucket • Updateunoptimized: • Anupdatemayneedtosplitoverflowbuckets • Spaceunoptimized: • Bucketsoftenarenotfull