xml data exchange
play

XML data exchange Amlie Gheerbrant LFCS University of Edinburgh - PowerPoint PPT Presentation

XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References XML data exchange Amlie Gheerbrant LFCS University of Edinburgh 11/11/2010 - Dagstuhl


  1. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References XML data exchange Amélie Gheerbrant LFCS University of Edinburgh 11/11/2010 - Dagstuhl DEIS’10 Amélie Gheerbrant XML data exchange 1/ 39

  2. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Outline XML Databases and Schema Mappings 1 Static Analysis of XML Schema Mappings 2 Exchange with XML Schema Mappings 3 Other directions, Summary & References 4 Amélie Gheerbrant XML data exchange 2/ 39

  3. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Data exchange Goal: construct an instance T of the target schema (based on the source and the mapping) answer queries against the target data in a way consistent with the source data Key notions: schema mappings, solutions, source-to-target tuple dependencies, certain answers Amélie Gheerbrant XML data exchange 3/ 39

  4. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Main tasks in data exchange Static analysis consistency of schema mappings (becomes an issue with XML) operations on mappings Relatively small inputs, higher complexity bounds. Dealing with data materializing target instances query answering Typically large databases, only low complexity algorithms. Amélie Gheerbrant XML data exchange 4/ 39

  5. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References XML databases An XML document airline flight flight flight @#=AF366 @#=AF367 @#=AF368 dep ar dep ar dep ar @name @name @name @name @name @name = = = = = = Edinburgh Paris Paris Moscow Moscow Paris Amélie Gheerbrant XML data exchange 5/ 39

  6. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Theoretical abstraction of XML documents Tree structures T = � U , ↓ , → , lab , ( ρ a ) a ∈ Att � over countable: labeling alphabet Γ (elements types, e.g., flight) set Att of attributes names (e.g., @name) set Str of possible attribute values (e.g., Paris ) where: U is an unranked finite tree domain ↓ and → are the child and the next sibling relations lab : U → Γ is the labeling function each ρ a is a partial function from U to Str Amélie Gheerbrant XML data exchange 6/ 39

  7. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References DTD (Document Type Definition) XML data exchange settings Source and target DTD’s (instead of source and target relational schemas) A DTD D over Γ and Att consists of two mappings P : Γ → regular expressions over Γ − { root } A : Γ → 2 Att A tree T conforms to a DTD D , i.e., T | = D if its root is labeled root the set of attributes for a node labeled ℓ is A ( ℓ ) and the labels of its children, read left-to-right, form a string in the language of P ( ℓ ) Amélie Gheerbrant XML data exchange 7/ 39

  8. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Example The previous tree conforms to any DTD D where: flight : @# ; dep : @ name ; ar : @ name airline → flight ∗ or airline → flight , flight , flight and either flight → dep , ar flight → dep , ar | flight flight → dep , ar , time ? flight → dep , ar | depcity , arcity etc Amélie Gheerbrant XML data exchange 8/ 39

  9. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Nested-relational DTD’s A lot of things are easier for nested relational DTD’s (important part of real world DTD’s). Nested relational DTD’s All productions are of the form ℓ → ˆ ℓ 1 , . . . , ˆ ℓ m where all ℓ i ’s are distinct labels from Γ ˆ ℓ i is either ℓ i , ℓ ∗ i , ℓ + i = ℓ i ℓ ∗ i , or ℓ i ? = ℓ i | ǫ and the graph in which we put an edge between ℓ and all the ℓ i ’s for each production has no cycle (the DTD is not recursive) Amélie Gheerbrant XML data exchange 9/ 39

  10. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Examples of non nested relational DTD’s DTD’s D where: airline → flight ∗ flight : @# ; dep : @ name ; ar : @ name and either flight → dep , ar | flight flight → dep , ar | depcity , arcity Amélie Gheerbrant XML data exchange 10/ 39

  11. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Schema mappings via tree patterns st-tgds are defined using tree patterns. _ // [ flight ( u )[ dep ( x ) → ∗ ar ( y )] , flight ( v )[ dep ( y ) → ∗ ar ( z )]] _ flight flight @#=u @#=v ∗ ∗ dep ar dep ar @name=x @name=y @name=y @name=z the wildcard _ can be used instead of label names variables correspond to attributes names special edges are used for → ∗ and ↓ ∗ Amélie Gheerbrant XML data exchange 11/ 39

  12. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Tree patterns: syntax Tree patterns are given by: ℓ (¯ π := x )[ λ ] , where ℓ ∈ Γ ∪ { _ } patterns λ ǫ | µ | //π | λ, λ := sets π | π → µ | π → ∗ µ µ := sequences Nodes are described by subformulas ℓ (¯ x ) where ¯ x is a tuple of variables corresponding to the attributes of the node. Amélie Gheerbrant XML data exchange 12/ 39

  13. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Generalized tree patterns Equalities Using variables allows to express things like: airline [ flight ( x )[ dep ( y )] , flight ( z )[ dep ( y )]] Equivalently: airline [ flight ( x )[ dep ( y )] , flight ( z )[ dep ( w )]] ∧ y = w In generalized tree patterns inequalities are also allowed airline [ flight ( x )[ dep ( y )] , flight ( z )[ dep ( w )]] ∧ y = w ∧ x � = z Amélie Gheerbrant XML data exchange 13/ 39

  14. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References = π (¯ Tarskian notion of satisfaction: ( T , s ) | a ) The following tree patterns are satisfied at the root s of our tree airline [ flight ( x )[ dep ( y ) → ar ( z )]] airline [ // _ ( y ) → ∗ ar ( z )] ∧ y � = z airline [ // dep ( y )] For the following assignments: x = AF 366 , y = Edinburgh , z = Paris x = AF 367 , y = Paris , z = Moscow . . . Amélie Gheerbrant XML data exchange 14/ 39

  15. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Semantics of tree patterns via homomorphism A tree pattern π can be seen as a tree like structure S π = � U , ↓ , ↓ ∗ , → , → ∗ , lab , ρ � with root π . Hence T | = π iff there exists a homomorphism from π to T A homomorphism between a pattern π and a tree T maps: the domain of π into the domain of T attribute values of the π i ’s to attributes values of the image of the π i ’s in T and preserves: relations ↓ , ↓ ∗ , → , → ∗ labels (except the wildcard _) (in)equalities between attribute values Amélie Gheerbrant XML data exchange 15/ 39

  16. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Schema mappings based on tree patterns An XML schema mapping is a triple M = ( D s , D t , Σ st ) where D s is the source DTD, D t is the target DTD, Σ st is a set of st-tgds of the form z π ′ (¯ π (¯ x , ¯ y ) → ∃ ¯ x , ¯ z ) where π and π ′ are tree patterns Solutions for S under M T ∈ Sol M ( S ) with S | = D s if: T | = D t ( S , T ) satisfy all st-tgds from Σ st a , ¯ = π (¯ b ) , there is ¯ = π ′ (¯ a , ¯ (i.e. whenever S | c s.t. T | c ) ) Amélie Gheerbrant XML data exchange 16/ 39

  17. XML Databases and Schema Mappings Static Analysis of XML Schema Mappings Exchange with XML Schema Mappings Other directions, Summary & References Some schema mapping M airline → serves ∗ ; serves → company ∗ target DTD: serves : @ name ; company : @ name airline [ // dep ( x ) , // ar ( y )] → ∃ z ∃ z ′ st-tgd: airline [ // serves ( x )[ company ( z )] , // serves ( y )[ company ( z ′ )]] A solution for M airline serves serves serves @name=Edinburgh @name=Paris @name=Moscow company company company @name=Air France @name=KLM @name=Air France Amélie Gheerbrant XML data exchange 17/ 39

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend