Pal gov.tutorial2.session13 2.gav and lav integration
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Pal gov.tutorial2.session13 2.gav and lav integration

  • 635 views
Uploaded on

 

More in: Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
635
On Slideshare
577
From Embeds
58
Number of Embeds
2

Actions

Shares
Downloads
8
Comments
0
Likes
1

Embeds 58

http://www.egovacademy.ps 57
https://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ‫أكاديمية الحكومة اإللكترونية الفلسطينية‬ The Palestinian eGovernment Academy www.egovacademy.psTutorial II: Data Integration and Open Information Systems Session 13.2 GAV and LAV Integration Dr. Mustafa Jarrar University of Birzeit mjarrar@birzeit.edu www.jarrar.info PalGov © 2011 1
  • 2. AboutThis tutorial is part of the PalGov project, funded by the TEMPUS IV program of theCommission of the European Communities, grant agreement 511159-TEMPUS-1-2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.psProject Consortium: Birzeit University, Palestine University of Trento, Italy (Coordinator ) Palestine Polytechnic University, Palestine Vrije Universiteit Brussel, Belgium Palestine Technical University, Palestine Université de Savoie, France Ministry of Telecom and IT, Palestine University of Namur, Belgium Ministry of Interior, Palestine TrueTrust, UK Ministry of Local Government, PalestineCoordinator:Dr. Mustafa JarrarBirzeit University, P.O.Box 14- Birzeit, PalestineTelfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011 2
  • 3. © Copyright NotesEveryone is encouraged to use this material, or part of it, but shouldproperly cite the project (logo and website), and the author of that part.No part of this tutorial may be reproduced or modified in any form or byany means, without prior written permission from the project, who havethe full copyrights on the material. Attribution-NonCommercial-ShareAlike CC-BY-NC-SAThis license lets others remix, tweak, and build upon your work non-commercially, as long as they credit you and license their new creationsunder the identical terms. PalGov © 2011 3
  • 4. Tutorial Map Topic h Intended Learning Objectives Session 1: XML Basics and Namespaces 3A: Knowledge and Understanding Session 2: XML DTD’s 3 2a1: Describe tree and graph data models. Session 3: XML Schemas 3 2a2: Understand the notation of XML, RDF, RDFS, and OWL. 2a3: Demonstrate knowledge about querying techniques for data Session 4: Lab-XML Schemas 3 models as SPARQL and XPath. Session 5: RDF and RDFs 3 2a4: Explain the concepts of identity management and Linked data. Session 6: Lab-RDF and RDFs 3 2a5: Demonstrate knowledge about Integration &fusion of Session 7: OWL (Ontology Web Language) 3 heterogeneous data. Session 8: Lab-OWL 3B: Intellectual Skills Session 9: Lab-RDF Stores -Challenges and Solutions 3 2b1: Represent data using tree and graph data models (XML & Session 10: Lab-SPARQL 3 RDF). Session 11: Lab-Oracle Semantic Technology 3 2b2: Describe data semantics using RDFS and OWL. Session 12_1: The problem of Data Integration 1.5 2b3: Manage and query data represented in RDF, XML, OWL. Session 12_2: Architectural Solutions for the Integration Issues 1.5 2b4: Integrate and fuse heterogeneous data. Session 13_1: Data Schema Integration 1C: Professional and Practical Skills Session 13_2: GAV and LAV Integration 1 2c1: Using Oracle Semantic Technology and/or Virtuoso to store Session 13_3: Data Integration and Fusion using RDF 1 and query RDF stores. Session 14: Lab-Data Integration and Fusion using RDF 3D: General and Transferable Skills 2d1: Working with team. Session 15_1: Data Web and Linked Data 1.5 2d2: Presenting and defending ideas. Session 15_2: RDFa 1.5 2d3: Use of creativity and innovation in problem solving. 2d4: Develop communication skills and logical reasoning abilities. Session 16: Lab-RDFa 3 PalGov © 2011 4
  • 5. Module ILOsAfter completing this module students will be able to: - Understand and apply GAV and LAV integration. PalGov © 2011 5
  • 6. More about GAV and LAV IntegrationMapping in GAV:• A GAV mapping is a set of queries on local sources S1, S2, .., Sn (that contain real data!!), one for each element g of the global schema.• Such queries can be expressed in SQL or else in a formal logic. We will follow the first approach• g = SQL command (S1, S2, …,Sn)• This means that the mapping tells us exactly how the element g is computed from the local sources PalGov © 2011 6
  • 7. More about GAV and LAV IntegrationMapping in LAV:• A LAV mapping is a set of queries on the global schema (that contains virtual data), one for each local source (that contains real data!!).• Si = SQL command (GS).• In LAV, views express how sources contribute to the global schema (and the related virtual db instance). PalGov © 2011 7
  • 8. EXAMPLE S1 Name AgeSource S1 contains a first set of Khaled 24professors Munir 51 Schema: S1(Name, Age) S2 Name AgeSource S2 contains a second set of Layla 56professors Khaled 24 Schema: S1(Name, Age) Expected extension GProf Name Age Khaled 24Global Schema: GProf (Name, age) Munir 51 Layla 56 PalGov © 2011 8
  • 9. EXAMPLE – GAV Mapping Let’s define the global schemas as views on data sources S1 Name AgeCREATE VIEW GProf ASSELECT S1.Name as Name, S1.Age as Age Khaled 24FROM S1 Munir 51UNIONSELECT S2.Name AS Name, S2.Age AS Age S2 Name AgeFROM S2 Layla 56 The extension of this view is Khaled 24 Expected extensionGProf Name Age Khaled 24 GProf Name Age This view is called Munir 51 ‘EXACT’ because it is Khaled 24 Layla 56 exactly equal to the Munir 51 expected extension Layla 56 PalGov © 2011 9
  • 10. EXAMPLE – GAV MappingCREATE VIEW GProf ASSELECT S1.Name as Name, S1.Age as Age S1 Name AgeFROM S1 Khaled 24UNIONSELECT S2.Name AS Name, S2.Age AS Age Munir 51FROM S2 S2 Name AgeLET’S QUERY! Layla 56We want to query the global schema to Khaled 24extract names of profs that are older than50 years. Expected extensionSelect GProf.NameFrom GProf GProf Name AgeWhere Age > 50 Khaled 24 Munir 51 Layla 56 PalGov © 2011 10
  • 11. EXAMPLE – GAV Mapping CREATE VIEW GProf AS SELECT S1.Name as Name, S1.Age as Age S1 Name Age FROM S1 Khaled 24 UNION SELECT S2.Name AS Name, S2.Age AS Age Munir 51 FROM S2 S2 Name Age TRY TO EXECUTE THE QUERY: Layla 56 Select GProf.Name Khaled 24 From GProf Where Age > 50 Expected extensionYou should have performed the following process:Substitution of Gprof with the definition of the view GProf Name AgeSelect GProf.Name Khaled 24From Select S1.Name, S1.Age from S1 Union … Munir 51Where Age > 50 Layla 56 PalGov © 2011 11
  • 12. EXAMPLE – GAV MappingCREATE VIEW GProf ASSELECT S1.Name as Name, S1.Age as Age S1 Name AgeFROM S1 Khaled 24UNIONSELECT S2.Name AS Name, S2.Age AS Age Munir 51FROM S2 S2 Name AgeTRY TO EXECUTE THE QUERY: Layla 56Select GProf.Name Khaled 24From GProfWhere Age > 50 Expected extension Results GProf Name Age GProf Name Age Khaled 24 Munir 51 Munir 51 Layla 56 Layla 56 PalGov © 2011 12
  • 13. EXAMPLE – GAV MappingCREATE VIEW GProf ASSELECT S1.Name as Name, S1.Age as Age S1 Name AgeFROM S1 Khaled 24UNIONSELECT S2.Name AS Name, S2.Age AS Age Munir 51FROM S2 S2 Name AgeHow is the query executed: Layla 56The query is expressed and executed by the Khaled 24mediator naturally, since in GAV, to executethe query we only have to substitute thereferences to Gprof in the query with the Expected extensionmapping of Gprof in terms of local schemas GProf Name Age(this operation is called unfolding). Khaled 24 Munir 51 Layla 56 PalGov © 2011 13
  • 14. EXAMPLE – LAV MappingHere the mapping describes the S1 Name Agecontribution of the local sources to the Khaled 24expected extension of the global schema Munir 51S1 (Name, Age) S2 Name AgeCreate View S1 (Name, Age) as Layla 56Select GProf.Name as S1.Name, Khaled 24GProf.Age as S1.AgeFrom GProf Expected extension GProf Name Age Khaled 24 Munir 51 Layla 56 PalGov © 2011 14
  • 15. EXAMPLE – LAV MappingHere the mapping describes the S1 Name Agecontribution of the local sources to the Khaled 24expected extension of the global schema Munir 51S1 (Name, Age) S2 Name AgeCreate View S1 (Name, Age) as Layla 56Select GProf.Name as S1.Name, Khaled 24GProf.Age as S1.AgeFrom GProf Expected extensionS2 (Name, Age) GProf Name AgeCreate View S2 (Name,Age) asSelect GProf.Name as S2.Name, Khaled 24 GProf.Age as S2.Age Munir 51From GProf Layla 56 PalGov © 2011 15
  • 16. EXAMPLE – LAV Mapping Query Execution: S1 Name AgeLet’s see the mapping as a query on the Khaled 24global schema. In this case the mediator in Munir 51query execution can’t perform the unfolding S2 Name Ageoperation since the mapping is in the opposite Layla 56direction!!! Khaled 24So, the mediator has to perfrom a reasoning.The mediator may adopt a strategy in which, Expected extensionstarting from the definitions of the mappings, GProf Name Agelooks for names of professors in both views Khaled 24and subsequently fuses the results Munir 51 Layla 56 PalGov © 2011 16
  • 17. References• Carlo Batini: Course on Data Integration. BZU IT Summer School 2011.• Stefano Spaccapietra: Information Integration. Presentation at the IFIP Academy. Porto Alegre. 2005.• Chris Bizer: The Emerging Web of Linked Data. Presentation at SRI International, Artificial Intelligence Center. Menlo Park, USA. 2009. PalGov © 2011 17