Global-as-View
Global-as-View (GaV, Global-als-Sicht) is a technical term from computer science that refers to the type of processing of data.
Global-as-View describes a pattern for merging schemas in the context of information integration . The core idea is that individual relations of the global schema are expressed as views of the local schemas of the data sources. In contrast to the reverse approach Local-as-View , which is based on the global schema, Global-as-View is mainly used in materialized integration - especially in data warehouse systems.
Constraints of the global scheme can be modeled in contrast to constraints of the local sources. Since only one relation of the global schema is ever modeled as a view, there are no associations across several relations of the global schema.
A typical feature of the generated views is a union (UNION) of several sources. The resulting duplicates and incomplete data records must be merged by means of duplicate detection and data fusion ( data cleansing ).
With global-local-as-view or both-as-view, there is a method that combines the properties of global-as-view and local-as-view by mapping views to views between global and local schema.
example
A global scheme with two relations is given:
Person: Ausweisnummer, Name, Jahrgang
Adresse: Ausweisnummer, Ort
These should be displayed as a view of the following local schemes:
Q1: Ausweisnummer, Name, Ort
Q2: Name, Ausweisnummer, Jahrgang
Q3: Ausweisnummer, Jahrgang, Beruf
Only source can be Q1
used for the addresses (in SQL syntax):
CREATE VIEW Adresse AS
SELECT Ausweisnummer, Ort
FROM Q1
With the exception of the profession, personal data are contained in the source Q2
and in combination in Q1
and Q3
:
CREATE VIEW Person AS
SELECT Ausweisnummer, Name, Jahrgang
FROM Q2
UNION
SELECT Q1.Ausweisnummer, Q1.Name, Q3.Jahrgang
FROM Q1, Q3
WHERE Q1.Ausweisnummer = Q3.Ausweisnummer
Constraints of the global scheme can be adopted. For example, if only people from Munich are to be taken into account, the address view is:
CREATE VIEW Adresse AS
SELECT Ausweisnummer, Ort
FROM Q1
WHERE Ort="München"
Inquiry processing
The processing of requests to the global schema is very easy with Global-as-View with nested requests. Relations of the global schema are replaced directly by their views of the local sources. The result is a large nested query that can be optimized by reformulating it.
Example: Request for the above view:
SELECT *
FROM Person
would then be translated into:
SELECT *
FROM (
SELECT Ausweisnummer, Name, Jahrgang
FROM Q2
UNION
SELECT Q1.Ausweisnummer, Q1.Name, Q3.Jahrgang
FROM Q1, Q3
WHERE Q1.Ausweisnummer = Q3.Ausweisnummer
) AS Person
literature
- Jeffrey Ullmann: Information Integration Using Logical Views . In: Proceedings of the 6th International Conference on Database Theory. Springer, 1997. pp. 19-40 ISBN 3-540-62222-5