190 likes | 307 Views
Graceful Database Schema Evolution: the PRISM Workbench. Carlo A. Curino , Hyun J. Moon, and Carlo Zaniolo VLDB 2008 Presented by: Kristian Torp. Motivation. Problems select * from emp insert into emp (name, dept) values (:x, :y) Current status
E N D
Graceful Database Schema Evolution:the PRISM Workbench Carlo A. Curino, Hyun J. Moon, and Carlo Zaniolo VLDB 2008 Presented by: Kristian Torp
Motivation • Problems • select * from emp • insert into emp (name, dept) values (:x, :y) • Current status • Manual, error prone, time-consuming process • Missing methods and tools New requirements Version n Version n+1 “Database Refactoring” Database Specialization Course 2010
Overview • Challenges • Schema Modification Operators (SMOs) • The tool and performance • Conclusion • Critique Database Specialization Course 2010
The Current Situation and Solution v2 v5 v4 v3 v2 v1 v1 Time Time backward forward “Rock Climbing” “Stepping Stones” Database Specialization Course 2010
Main Challenges • Schema evolution • Dramatic impact data and queries • Extensive application maintenance • Cause unacceptable system downtime • Becoming a bigger problem • More collaboration (web-databases) • No downtime (300K$/hours) • Larger databases • Method/tool must support • Predict and evaluate the effect of schema changes • Rewrite queries and applications • Migrate the data Database Specialization Course 2010
Problem Context: The Power of RDBMSs View 1 View 2 View n Logical Prism Physical DBMSs Database Specialization Course 2010
WikeMedia Schema Change oid pid title title user page old is_new minor is_redirect text latest timestamp rid pageid oid user revision title minor user timestamp cur minor text timestamp tid text is_new text is_redirect V42 V41 Database Specialization Course 2010
Schema Change: Effect Queries • Get current information about Auckland entry SELECTcur.textFROM cur WHEREcur.title= ’Auckland’ V41 SELECTtext.text FROM page, revision, text WHERE page.pid = revision.page AND revision.rid = text.tid ANDpage.latest= revision.rid ANDpage.title= ’Auckland’ V42 Database Specialization Course 2010
SMO: Diagram and Specification Database Specialization Course 2010
SMO: Examples partition merge join decompose Database Specialization Course 2010
SMO Overview (Schema and Data) Database Specialization Course 2010
SMO Characteristics Database Specialization Course 2010
Prism: The Architecture Database Specialization Course 2010
Prism: The Workflow [source: http://yellowstone.cs.ucla.edu:8180/Prism2/Prism.html#] Database Specialization Course 2010
Prism: A Screen Dump Database Specialization Course 2010 [source: http://yellowstone.cs.ucla.edu:8180/Prism2/Prism.html#]
Prism: Performance Database Specialization Course 2010
Conclusion • Tool that support schema evolution and data/query migration • Provides a method (and naturally a tool) for the DBA • Available online for testing • Tool used on real-world non-trivial examples • Data provenance • Documentation of what is done • Schema modification almost entirely be automated • 97% in tested, i.e., 3% manually • Data/query migration performance well Database Specialization Course 2010
Good • Relevant problem • Bridges the theoretical world with practice • Provides an operational tool • Real-world, non-trivial running example • Makes practical use of existing research • Validation: • “practical soundness and completeness” • “theoretical advances into practical solutions” • Round-trip, e.g., forward and backward • Data provenance Database Specialization Course 2010
Could be improve • What happens if you drop a table is the data then gone? • Can you then go back (flash-back) • “system stores and maintains the schema layout history….” • “chase-based query rewriting” p764 unclear • Better description of key mappings in running example • Handling of constraints in general • Too many foot notes • Minor errors • Some spelling errors “gygabytes” • DED introduced multiple times • Table 1 misplaced • Dislikes SELECT * (p763) but uses it later (p. 769) • Is (unique, perfect) values (no, yes) impossible in Table 3? Database Specialization Course 2010