Berkeley DB The Good The Bad and the
Berkeley DB: The Good, The Bad and the Ugly Margo Seltzer Failed Aspirations in Database Systems August 28, 2017
A Refresher: What is Berkeley DB? Key-Value Store 2
A Refresher: What is Berkeley DB? ACIDACIDACIDACIDACIDACIDACIDACID Key-Value Store ACIDACIDACIDACIDACIDACIDACIDACIDACIDACIDACIDACIDACIDACID 3
DB PAXOSPAXOSPAXOSPAXOSPAXOSPAXOS XML PAXOSPAXOSPAXOSPAXOSPAXOSPAXOS SQL PAXOSPAXOSPAXOSPAXOS A Refresher: What is Berkeley DB? 4
DB PAXOSPAXOSPAXOSPAXOSPAXOSPAXOS XML PAXOSPAXOSPAXOSPAXOSPAXOSPAXOS SQL PAXOSPAXOSPAXOSPAXOS A Refresher: What is Berkeley DB? 5
Three Lessons I P A XML and XQuery: NThe OT Cure for All Data 7
Page Format: History 8
Page Format: db. 185 Hash N k 1 off d 1 off k 2 off d 2 off Remaining offsets … Free space Other keys/datas Data 1 Key 2 Key 1 9
Page Format: db. 2. 0 lsn nentries pgno ppgno npgno f_offset Free space Etc … Data-struct-2 Key-struct-1 10
Page Format: db. 2. 0 I need lengths in my item structures and I need to represent duplicates data items as individual key/data pairs Alors! I can’t waste all that space! I don’t need no stinkin’ lengths; my duplicates all pack into a single data item! And my code is already working! 11
Page Formats: Consequences 12
Page Formats: Lessons 13
I P A API Design: History 14
I P A Making Processes Wait Process 1 Process 2 Process 3 15
I P A Lock per Resource! 16
I P A Lock per Resource! Process 1 Process 2 Process 3 17
I P A Lock per Resource! holds Process 1 X R R Process 2 wants Process 3 18
I P A Lock per Resource! Process 1 X R R Process 2 holds wants holds Process 3 19
I P A Consequences 20
I P A Lessons 21
T XML and XQuery: The Cure for All Data NO XML: History 22
T XML and XQuery: The Cure for All Data NO cy Berkeley DB XML re co m pe ten • Storage, schema and query layer built on top of Berkeley DB • Flexible XML-based storage Co – Documents are stored in containers. – Query documents using XQuery 1. 0. Berkeley DB XML Berkeley DB Document Parser Query Planner All the value add Query Optimizer
T XML and XQuery: The Cure for All Data NO And what about customers New Customers? 24
T XML and XQuery: The Cure for All Data NO XML Lessons Great Products Great People 25
Parting Thoughts 26
- Slides: 25