Local-as-View

from Wikipedia, the free encyclopedia

Local-as-View (LaV, local-as-view) is a technical term from computer science that refers to the type of processing of data.

Local-as-View describes a pattern for merging schemas in the context of information integration . The core idea is that individual relations of local schemas of the data sources are expressed as views of the common global schema. In contrast to the reverse approach Global-as-View , which starts from the local schemas, with Local-as-View the global schema remains constant when changing, adding and removing sources. It is therefore mainly used in mediator-based information systems .

Both associations across several relations of the global schema and secondary conditions of the sources can be modeled. However, this does not apply to associations via relations between different sources and constraints of the global schema.

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.

Examples

There are three local data sources with the following schemes:

  • Q1: Ausweisnummer, Name, Ort
  • Q2: Name, Ausweisnummer, Alter
  • Q3: Ausweisnummer, Alter, Beruf

These should be mapped to the following global scheme

  • Person: Ausweisnummer, Name, Alter

The views of the sources on the global schema are (in SQL )

  • CREATE VIEW S1 AS SELECT Ausweisnummer, Name, NULL FROM Person
  • CREATE VIEW S2 AS SELECT Name, Ausweisnummer, Alter FROM Person
  • CREATE VIEW S3 AS SELECT Ausweisnummer, Alter, NULL FROM Person

Associations across several relations of the global schema can also be modeled. Let there be another relation in the global schema that assigns ID numbers and locations to one another:

  • Adresse: Ausweisnummer, Ort

Then the source can be Q1represented as

  • CREATE VIEW S1 AS SELECT Person.Ausweisnummer, Person.Name, Adresse.Ort
    FROM Person, Adresse WHERE Person.Ausweisnummer = Adresse.Ausweisnummer

Constraints from sources are adopted directly. For example, if the source Q2only includes people aged 18 and over, the view is

  • CREATE VIEW S2 AS SELECT Ausweisnummer, Name, Alter FROM Person
    WHERE Alter >= 18

Inquiry processing

The processing of requests to the global schema is much more complex with Local-as-View than with Global-as-View. The individual views must be cleverly combined in such a way that their result answers part of the query or the entire query. The overall result is obtained by combining the various partial answers.

Since the partial inquiries often overlap or provide data that is not required, there is a lot of potential for optimization. An obviously trivial form of query processing would be to read out all of the sources. For example, a request can be optimized so that as little data as possible has to be transmitted from the sources, that it can be answered as quickly as possible, or that the sources are addressed as uniformly as possible.

Efficient algorithms for compiling sources are:

example

In the example given above, a request for the global schema with the relations Personand is Adressegiven:

SELECT Person.Alter, Adresse.Ort FROM Person, Adresse WHERE Person.Ausweisnummer=Adresse.Ausweisnummer

To answer, the request is rewritten so that it is placed via the views (for more information on request rewriting, see under Bucket Algorithm ):

SELECT S2.Alter, S1.Ort FROM S1, S2
WHERE S1.Ausweisnummer=S2.Ausweisnummer
UNION
SELECT S3.Alter, S1.Ort FROM S1, S3
WHERE S1.Ausweisnummer=S3.Ausweisnummer

The request reformulated in this way can now be carried out using the sources that correspond to the views.

literature