6. Nesting Mapping To handle the above issues , we proposed an extension to basic mappings based on arbitrary nesting of mapping formulas within other mapping formulas. We call this formalism nested mappings. 6
7. Basic Mapping Algorithm Step 1:Computation tableaux. Step 2:Generation of basic mapping. Step 3:Pruning of basic mapping. 7
8. Tableaux Each tableaux is primarily an encoding of one set type of a schema (for source schema and target schema). Tableaux include all related set types, that is, set types must exist together according to the parent-child relationship in the schema. 8
9. Computation of tableaux For each set type T ,we create primary path spells out the navigation path from root to elements of T. For each intermediate set ,there is a variable to denote elements of the intermediate set. Tableaux is obtained by primary path. 9
11. Generators We consider all the atomic type element that can be referred to from the variables in the tableaux for mapping purpose. We call the variables that appear in the tableaux generators. Ex:B3 includes dname, budget , ename , salary , pname , pid. 11
12. Generation of basic mapping(1/2) Basic mappings are generated by pairing in all the possible ways the source and the target tableaux. For each pair(A,B) of tableaux , let V denote the set of elements that are covered by both tableau A and tableau B . For example: (A1,B1)=>dname. (A1,B4)=>dname ,pname. 12
13. Generation of basic mapping(2/2) We write the basic represented by (A,B,V) as . Not all the possible (A,B,V) can generate actual mappings. We generate a basic mapping only if it is not subsumed and not impliedby other basic mapping. 13
15. Tableaux hierarchies For each schema , the subtableau relationship induces a directed acyclic graph of tableaux, with an edge from A to A’ whenever A<=A’ 15
16. Pruning of basic mapping The pruning step reduce the number of candidate mappings that the nesting algorithm will have to explore. We generate a basic mapping only if it is not subsumed and not impliedby other basic mapping. 16
17. Subsumed A basic mapping is subsumed by a basic mapping ,if A,B are subtableaux of A’,B’ ,with at least one being strict , V = V’ By subsumption condition ,we don’t have to consider (A,B,V) since it’s covered by (A’,B’,V’) For example: 17
18. Imply A basic mapping may be logically implied by another basic mapping. There is a simpler test suffices as follow: 18
19. Nestable We call a basic mapping is nestable inside a basic mapping if the following holds: A2 ,B2are strict subtableaux of A1 ,B1,respectively. V2 is a strict superset of V1. There is no correspondence v in V2-V1 whose target elements are covered by B1 19
20. Nestable (Example) Nestable inside A2 ,B3are strict subtableauxof A1 ,B4,respectively. {d,p,e,s} is a strict superset of {d,p}. There is no correspondence v in V2-V1 whose target elements are covered by B4 20