towards a general consistency management framework in the
play

Towards a General Consistency Management Framework in the Context of - PowerPoint PPT Presentation

Towards a General Consistency Management Framework in the Context of Database Application Evolution Anthony Cleve 10th December 2007 Joint work with Ragnhild Van Der Straeten (VUB) Jean-Luc Hainaut 1 Computer Science Faculty University of


  1. Towards a General Consistency Management Framework in the Context of Database Application Evolution Anthony Cleve 10th December 2007 Joint work with Ragnhild Van Der Straeten (VUB) Jean-Luc Hainaut 1 Computer Science Faculty University of Namur, Belgium

  2. Plan • Introduction What does consistency mean to Database Applications? • • Inconsistency classification for MDE revisited • Consistency management framework for program-db co-evolution • Co-evolution scenarios • Consistency checking • Consistency preservation/reconstruction • Tool support and demo • Conclusions and perspectives 2 Computer Science Faculty University of Namur, Belgium

  3. Introduction • Software-intensive systems made of • inter-dependent artefacts • of different natures • at different levels of abstraction • Consistency management crucial issue in the context of software evolution • Our focus • • evolution of database applications 3 Computer Science Faculty University of Namur, Belgium

  4. Introduction • Research objective = A general framework for consistency management including • a classification of possible inconsistencies • a classification of (co-)evolution scenarios • A generic approach • for consistency checking (detecting inconsistencies) • for consistency preservation (preventing or resolving inconsistencies) • Research questions (still open) 1. How to classify inconsistencies arising in a database evolution context? 2. How is such a classification related to the existing classifications in an MDE context? 3. Can consistency checkers be derived from inter-model mappings? 4. How to derive consistency reconstruction from detected inconsistencies? 4 Computer Science Faculty University of Namur, Belgium

  5. What does consistency mean to database applications? DDL DML Database Platform Data model syntax syntax Conceptual schema Logical schema Database Schema source code Physical schema Application Programs Programs execution DDL code Must be consistent with Data instances 5 Computer Science Faculty University of Namur, Belgium

  6. What does consistency mean to database applications? DDL DML Data model syntax syntax Conceptual schema Logical schema source code Physical schema Programs execution DDL code Must be consistent with Data instances 6 Computer Science Faculty University of Namur, Belgium

  7. Nature of consistency relationships Logical Schema VS Data Model Logical Schema VS Conceptual schema  Meta-model compliance  Semantic compatibility (  equivalence) Potential semantic gap during logical design  Program source code VS DML syntax Logical Schema VS Data Model  Syntactical compliance of DB queries  Meta-model compliance Program source code VS Logical schema Physical Schema VS Logical schema  Structural compliance of DB queries Semantic compatibility/equivalence  DDL code VS Physical schema Program execution VS Data instances  High-fidelity translation  Behavioural compatibility  Because of the potential gap between CS and LS DDL code VS DDL syntax  Programs may introduce inconsistent data instances  Syntactical compliance Data instances VS DDL code  Format compliance 7 Computer Science Faculty University of Namur, Belgium

  8. Is the following query consistent? Conceptual schema Conceptual schema CUSTOMER CUSTOMER PRODUCT PRODUCT CUSNUM CUSNUM PRONUM PRONUM NAME NAME ORDERS ORDERS DESCRIPTION DESCRIPTION ADDRESS ADDRESS ORDNUM ORDNUM 0-N 0-N 1-1 1-1 CUS-ORD CUS-ORD STOCK_QTY STOCK_QTY CITY CITY DATE DATE CATEGORY CATEGORY id: PRONUM id: PRONUM id: ORDNUM id: ORDNUM ACCOUNT ACCOUNT 0-N 0-N 0-N 0-N id: CUSNUM id: CUSNUM ORD-DET ORD-DET DET-PRO DET-PRO 1-1 1-1 1-1 1-1 Implicit identifier DETAIL DETAIL QUANTITY QUANTITY Logical schema CUSTOMER ORDERS DETAIL PRODUCT CUSNUM NAME QUANTITY PRONUM ORDNUM ADDRESS ORDNUM DESCRIPTION DATE CITY PRONUM STOCK_QTY CUSNUM CATEGORY ACCOUNT insert into ORDERS(ORDNUM,DATE,CUSNUM) values (’1’,’10-12-2007’,’2’) 8 Computer Science Faculty University of Namur, Belgium

  9. Is the following query consistent? Conceptual schema Conceptual schema CUSTOMER CUSTOMER PRODUCT PRODUCT CUSNUM CUSNUM PRONUM PRONUM NAME NAME ORDERS ORDERS DESCRIPTION DESCRIPTION ADDRESS ADDRESS ORDNUM ORDNUM 0-N 0-N 1-1 1-1 CUS-ORD CUS-ORD STOCK_QTY STOCK_QTY CITY CITY DATE DATE CATEGORY CATEGORY id: PRONUM id: PRONUM id: ORDNUM id: ORDNUM ACCOUNT ACCOUNT 0-N 0-N 0-N 0-N id: CUSNUM id: CUSNUM ORD-DET ORD-DET DET-PRO DET-PRO 1-1 1-1 1-1 1-1 Implicit identifier DETAIL DETAIL QUANTITY QUANTITY Logical schema CUSTOMER ORDERS DETAIL PRODUCT CUSNUM NAME QUANTITY PRONUM ORDNUM ADDRESS ORDNUM DESCRIPTION DATE CITY PRONUM STOCK_QTY CUSNUM CATEGORY Implicit foreign key ACCOUNT insert into ORDERS(ORDNUM,DATE,CUSNUM) values (’1’,’10-12-2007’,’2’) 9 Computer Science Faculty University of Namur, Belgium

  10. Inconsistency classification for MDE revisited • In the MDE context… • Inconsistencies can be classified according to 2 dimensions [Van Der Straeten 2005] • In the DB context… difficult to distinguish between structural and semantic/behavioural consistency • • Notion of semantic compatibility between two database schemas • A database query has a syntax, a structure but also a behaviour/semantics at run time • specification and instance levels • conceptual, logical and physical schemas are of distinct levels of abstraction (all at the specification level) • a DB query relates to the specification level, but can be seen as an instance of DML syntax rules • a particular execution of a DB query rather relates to the instance level 10 Computer Science Faculty University of Namur, Belgium

  11. Classification of Co-evolution Scenarios • Database first evolution • 3 dimensions • Structural dimension : is the database structure modified? Semantic dimension : does the data meaning evolve? • • Platform dimension : are the DDL/DML replaced? • Typical co-evolution scenarios 11 Computer Science Faculty University of Namur, Belgium

  12. Example: Migration • Initial goal: changing the DB platform DDL DML Data model syntax syntax Conceptual schema Logical schema source code Physical schema Programs execution DDL code Must be consistent with Data instances 12 Computer Science Faculty University of Namur, Belgium

  13. Consistency Management • Includes • Consistency checking • Consistency preservation/reconstruction • Focus on program – schema consistency DDL DML Data model syntax syntax Conceptual schema Logical schema Programssource code Physical schema execution DDL code 13 Computer Science Faculty University of Namur, Belgium

  14. Consistency Management • Generic approach • Use of a generic data model (GER) • Use of an abstract, wide-spectrum data manipulation language (LDA) • Consistency rules are based on the mapping between the GER meta-model and the LDA syntax • These rules hold for existing data models and DML via abstraction/reexpression DDL LDA GER model syntax syntax Conceptual schema Logical schema source code Physical schema Programs execution DDL code 14 Computer Science Faculty University of Namur, Belgium

  15. Consistency Management • Generic approach • Use of a generic data model (GER) • Use of an abstract, wide-spectrum data manipulation language (LDA) • Consistency rules are based on the mapping between the GER meta-model and the LDA syntax • These rules hold for existing data models and DML via abstraction/reexpression DDL LDA consistency consistency GER model syntax syntax transformations transformations transformations transformations preservation preservation consistency consistency Conceptual schema GER Schema GER Schema LDA Program LDA Program checking checking Logical schema abstraction abstraction generation generation abstraction abstraction generation generation source code Physical schema Programs execution DDL DDL Host/DML Host/DML DDL code Code Code Program Program 15 Computer Science Faculty University of Namur, Belgium

  16. The GER Model • abstract union of all operational (practically used) database models • encompasses several paradigms:  ER, UML, SQL, CODASYL, IMS, file structures like COBOL, XML, etc. • encompasses several levels of abstraction:  conceptual, logical, physical, external • formal semantics based on NF2 relational theories sound basis for building transformational frameworks (all inter-model • transformations become intra-model transformations) • operational models defined by specialisation rules  selection  renaming  assembly rules (structural constraints) 16 Computer Science Faculty University of Namur, Belgium

  17. The GER Model • Example of an operational model: SQL2 relational model 17 Computer Science Faculty University of Namur, Belgium

Recommend


More recommend