Top Banner
Model-independent solutions to model management problems Francesca Bugiotti Università Roma Tre 1 17/12/2009
68

Model-independent solutions to model management problems

Feb 25, 2016

Download

Documents

Eliot

Model-independent solutions to model management problems. Francesca Bugiotti Università Roma Tre. Model management. What is A systematic approach to metadata management, which handles schemas by means of a set of predefined operators. Its goals - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Diapositiva 1

Model-independent solutionsto model management problemsFrancesca BugiottiUniversit Roma Tre117/12/2009Model managementWhat isA systematic approach to metadata management, which handles schemas by means of a set of predefined operators.

Its goalsEnhance the productivity of software developers, by offering them techniques that allow for high-level specifications and abstraction over recurring tasks involving the manipulation of schemas.

2Universit Roma Tre17/12/20092Model managementModel management systemsHandle schemas and mappings and support a wide variety of operations on them.

MIDSTWe propose MIDST[1,2,3], a platform originally conceived for model-independent schema and data translation, as the basis to build a model management system.The so built model management system aims at being model-independent and model-aware.

3Universit Roma Tre17/12/2009What model management addressesConcrete needs: they are a formalization of concrete and frequent database maintenance problems

data integration over heterogeneous databasesdata exchange between independent databasesETL wrapper generation for the access to relational databases from object-oriented applicationsweb site generation from databases.

4Universit Roma Tre17/12/2009What model management addressesModel management solutions to formalized problems:

schema integration

schema evolution

forward engineeringround-trip engineering

5Universit Roma Tre17/12/2009Schema integration17/12/2009Universit Roma Tre6S1S2S1S2S3map12map23Forward engineering17/12/2009Universit Roma Tre7V1S1S2V2S2map1map2Round-trip engineering17/12/2009Universit Roma Tre8S1I1I2S2I2map1map2Model management problems solutionSolutions to model management problems are given in terms of scripts.

A script is a set of model management operators which are executed according to a specific control flow.

9Universit Roma Tre17/12/2009OperatorsThe operators involved in the script specifications are:

MatchDiffMergeComposeModelgenCopy

10Universit Roma Tre17/12/2009MatchGiven two schemas S1 and S2, we define

map12 = MATCH(S1,S2)

where MATCH is the operator identifying correspondences between the two schemas and hence yielding a possible mapping.

There are several algorithms implementing MATCH operators.11Universit Roma Tre17/12/2009Match17/12/2009Universit Roma Tre12BA

BCDEABAS1S2Match(S1,S2) = ?Match17/12/2009Universit Roma Tre13BA

BCDEABAS1S2Match(S1,S2) = map12BA

BCDEABAS1S2DiffGiven two schemas S and S1 the dierence

diff(S, S1)

is a schema S2 that contains all the schema elements of S that do not appear in S1.

It can be interpreted as a set-oriented difference.

14Universit Roma Tre17/12/2009Example17/12/2009Universit Roma Tre15BA

BCDEABADiff(S,S1) = ?SS1Example17/12/2009Universit Roma Tre16BA

BCDEABADiff(S,S1) = S2SS1BACDEAS2MergeGiven S and S1, their merge

merge(S, S1)

is a schema S2 that contains the schema elements that appear in at least one of S or S1, modulo equivalence.

It can be interpreted as a set-oriented union.

17Universit Roma Tre17/12/2009Example17/12/2009Universit Roma Tre18BA

BCDEAFAMerge(S,S1) = ?SS1Example17/12/2009Universit Roma Tre19BA

BCDEAFAMerge(S1,S2) = S3S1S2BABFCDES3AComposeGiven three schemas: S1, S2, S3 and two mappings, map12 between S1 and S2 and map23 between S2 and S3, we define map13 as the composition of map12 and map23 as the mapping between S1 and S3.

Compose(S1, S2,S3, map12, map23) = map1320Universit Roma Tre17/12/2009ModelgenGiven a schema S of a source model M and a target model M 1 , the translation

modelgen(S, M 1 )

is a schema S1 of M1 that corresponds to S . 21Universit Roma Tre17/12/2009Modelgen17/12/2009Universit Roma Tre22M1 = Relational ModelModelgen(S,M1) = ?M = ER ModelSExample17/12/2009Universit Roma Tre23SS1Modelgen(S,M1) = S1OperatorsA major goal is to provide model-independent operators, which guarantee some kind of model closure property.

Here we move from a simplified version of Bernsteins solving procedure for the round-trip engineering problem [4], in order to introduce the needed operators and explain how they are implemented in a model-independent fashion.

24Universit Roma Tre17/12/2009Round-trip engineeringOne of the most meaningful model management problems.Let us take it as an example to illustrate our approach to model management problems.

S1: specification schemaI1: an implementation schema obtained from S1I2: a modified version of the implementation I2S2: a new specification which corresponds to I2.S1S2I1I225Universit Roma Tre17/12/2009Round-trip engineeringS1is the specification schema which is translated into its corresponding implementation schema I1.

It is a common example where the specification is expressed in ER and the implementation is relational.

The translation might be performed using MIDST itself, since it was conceived as an implementation of the MODELGEN operator.ManagerPCodeTitleSSNEIDName(1,1)(0,N)S1ProjectProject (PCode, Title, MGRSSN*)Manager (SSN, EID, Name)I126Universit Roma Tre17/12/2009Round-trip engineeringI2is the implementation schema which is a modified version of I1.The transformation involves a change in the key of a referred relation. The key of Manager, which is referred by MGRSSN of Project in I1, becomes EID in I2. As a consequence, the column MGRSSN of Project, referencing SSN ofManager, has to reference EID. MGRID is the version of MGRSSN modified accordingly.

Project (PCode, Title, MGRSSN*)Manager (SSN, EID, Name)I1Project (PCode, Title, MGRID*)Manager (SSN, EID, Name, Degree)I227Universit Roma Tre17/12/2009Round-trip engineeringProject (PCode, Title, MGRID*)Manager (SSN, EID, Name, Degree)I2ER ?S2Our goal is to generate S2, the appropriately revised version of the specification schema, such that its corresponding implementation is I2.28Universit Roma Tre17/12/2009Operators in scriptsThe solution which has been provided for the round-trip engineering is based on a set of model management operators: DIFF, MERGE and MODELGEN.

DIFF and MERGE have been used to compute the difference and the union of schemas.

MODELGEN has been used as a solution to translate the specification schema into the implementation and to compute the reversed differences.

29Universit Roma Tre17/12/2009The Round-trip solving script

30Universit Roma Tre17/12/2009Midst and ModelgenThe platform MIDST was originally conceived as a framework to perform model-independent schema and data translations.

MIDST was designed as a model-generic implementation of MODELGEN.

31Universit Roma Tre17/12/2009TranslationsEntityRelationshipRelational

XSDObjectOriented WSMObject RelationalObjectRelationalXSD32Universit Roma Tre17/12/200932TranslationsEntityRelationshipRelational

XSDObjectOriented WSMObject RelationalObjectRelationalXSD33Universit Roma Tre17/12/200933The constructs in the various model are rather similar:

Can be classified into a few categories (metaconstructs)

IE: the entity of the ER, the Object of the OO can be reconduct to the same abstract concept, the Abstract of our supermodel.The metamodel approach34Universit Roma Tre17/12/200934A model that includes all the meta-constructs (in their most general forms)

Each model is subsumed by the supermodel (modulo construct renaming)Each schema for any model is also schema for the supermodel (modulo construct renaming).The supermodel35Universit Roma Tre17/12/200935Translations can be defined on metaconstructsAnd there are standard accepted ways to deal with translation of metaconstructsThey can be performed within the supermodel

Each translation from the supermodel SM to a target model M is also a translation from any other model to M.

Translations specification36Universit Roma Tre17/12/200936Translation specificationThe Datalog is used to specify the translation

A translation script in our tool is a set of datalog rules.

37Universit Roma Tre17/12/2009DatalogDeclarative language

We specify the condition for the insertion

For every set of construct that matchs the conditions in B we create a new construct AA