Weitere ähnliche Inhalte
Ähnlich wie Pal gov.tutorial2.session13 2.gav and lav integration (17)
Mehr von Mustafa Jarrar (20)
Kürzlich hochgeladen (20)
Pal gov.tutorial2.session13 2.gav and lav integration
- 1. أكاديمية الحكومة اإللكترونية الفلسطينية
The Palestinian eGovernment Academy
www.egovacademy.ps
Tutorial 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. About
This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the
Commission of the European Communities, grant agreement 511159-TEMPUS-1-
2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps
Project 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, Palestine
Coordinator:
Dr. Mustafa Jarrar
Birzeit University, P.O.Box 14- Birzeit, Palestine
Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011
2
- 3. © Copyright Notes
Everyone is encouraged to use this material, or part of it, but should
properly 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 by
any means, without prior written permission from the project, who have
the full copyrights on the material.
Attribution-NonCommercial-ShareAlike
CC-BY-NC-SA
This license lets others remix, tweak, and build upon your work non-
commercially, as long as they credit you and license their new creations
under the identical terms.
PalGov © 2011 3
- 4. Tutorial Map
Topic h
Intended Learning Objectives
Session 1: XML Basics and Namespaces 3
A: 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 3
B: 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 1
C: 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 3
D: 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
- 6. More about GAV and LAV Integration
Mapping 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 Integration
Mapping 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 Age
Source S1 contains a first set of
Khaled 24
professors
Munir 51
Schema: S1(Name, Age)
S2 Name Age
Source S2 contains a second set of Layla 56
professors Khaled 24
Schema: S1(Name, Age)
Expected extension
GProf Name Age
Khaled 24
Global 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 Age
CREATE VIEW GProf AS
SELECT S1.Name as Name, S1.Age as Age Khaled 24
FROM S1 Munir 51
UNION
SELECT S2.Name AS Name, S2.Age AS Age
S2 Name Age
FROM S2
Layla 56
The extension of this view is Khaled 24
Expected extension
GProf 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 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
LET’S QUERY! Layla 56
We want to query the global schema to Khaled 24
extract names of profs that are older than
50 years.
Expected extension
Select GProf.Name
From GProf GProf Name Age
Where 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 extension
You should have performed the following process:
Substitution of Gprof with the definition of the view GProf Name Age
Select GProf.Name Khaled 24
From Select S1.Name, S1.Age from S1 Union … Munir 51
Where Age > 50
Layla 56
PalGov © 2011 11
- 12. 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 extension
Results
GProf Name Age
GProf Name Age
Khaled 24
Munir 51
Munir 51
Layla 56
Layla 56
PalGov © 2011 12
- 13. 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
How is the query executed: Layla 56
The query is expressed and executed by the Khaled 24
mediator naturally, since in GAV, to execute
the query we only have to substitute the
references to Gprof in the query with the Expected extension
mapping 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 Mapping
Here the mapping describes the
S1 Name Age
contribution of the local sources to the
Khaled 24
expected extension of the global schema
Munir 51
S1 (Name, Age)
S2 Name Age
Create View S1 (Name, Age) as Layla 56
Select GProf.Name as S1.Name,
Khaled 24
GProf.Age as S1.Age
From GProf
Expected extension
GProf Name Age
Khaled 24
Munir 51
Layla 56
PalGov © 2011 14
- 15. EXAMPLE – LAV Mapping
Here the mapping describes the
S1 Name Age
contribution of the local sources to the
Khaled 24
expected extension of the global schema
Munir 51
S1 (Name, Age)
S2 Name Age
Create View S1 (Name, Age) as Layla 56
Select GProf.Name as S1.Name,
Khaled 24
GProf.Age as S1.Age
From GProf
Expected extension
S2 (Name, Age)
GProf Name Age
Create View S2 (Name,Age) as
Select GProf.Name as S2.Name, Khaled 24
GProf.Age as S2.Age Munir 51
From GProf Layla 56
PalGov © 2011 15
- 16. EXAMPLE – LAV Mapping
Query Execution:
S1 Name Age
Let’s see the mapping as a query on the Khaled 24
global schema. In this case the mediator in Munir 51
query execution can’t perform the unfolding
S2 Name Age
operation since the mapping is in the opposite
Layla 56
direction!!!
Khaled 24
So, the mediator has to perfrom a reasoning.
The mediator may adopt a strategy in which, Expected extension
starting from the definitions of the mappings, GProf Name Age
looks for names of professors in both views Khaled 24
and 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