Conceptcore
Global-as-view and local-as-view
Also called GAV, LAV, GLAV mappings.
Two ways to relate sources to a mediated schema: define each global relation as a view of sources, or each source as a view of the global schema.
Global-as-view (GAV) and local-as-view (LAV) are the two classic ways to state how data sources relate to the mediated, or global, schema of a data integration system. In GAV, each global relation is defined as a query over the sources. In LAV, each source is described as a query over the global schema. Both are special forms of a schema mapping: that page defines mappings in general and their semantics, while this page is about the two forms and what each one means for answering queries.
In plain words
A travel site shows one list of routes, but the routes come from many airline databases. Someone must write down how the site's list relates to the airlines' data.
One way is to say, for each list on the site, which airline data fills it. This is global-as-view. Answering a question is then easy: replace each list by the recipe that fills it. But a new airline means changing the recipes.
The other way is to say, for each airline database, what part of the site's lists it shows. This is local-as-view. A new airline only needs its own description. But the site now knows the data only in part, for example "there is some stop between these two cities", and it must reason about what is surely true.
The idea
A data integration system has a global schema , a source schema and a mapping between them. The data stays in the sources. A user asks a query over , and the system answers it from the source data. Each global database that agrees with the sources under the mapping is a possible world, and the system returns the certain answers: the tuples that are answers in every possible world.
GAV. Each global relation gets a query over the sources. As a dependency this is , with one global atom in the head and no existential variable. If the global schema has no constraints, the global database is fixed by the sources: it is the result of the definitions. A query over is answered by unfolding: each global atom is replaced by its definition, and the result runs on the sources.
LAV. Each source relation gets a query over the global schema. As a dependency this is , with one source atom in the body. The sources now fix the global database only in part, and query answering is answering queries using views under incomplete information. For sound sources with conjunctive view definitions and conjunctive queries, a maximally contained rewriting, found for example by the inverse rules, bucket or MiniCon algorithm, gives the certain answers.
Sound, complete and exact sources. Lenzerini distinguishes three readings of a source description. A sound source holds a subset of the tuples of its query, a complete source a superset, and an exact source exactly those tuples. The common default is sound sources, which is the open world assumption. Exact sources give the closed world assumption, and there Abiteboul and Duschka showed that the certain answers of conjunctive queries over conjunctive views are coNP-complete in data complexity. Under the open world assumption the same problem takes polynomial time in data complexity.
The trade-off. GAV makes query answering simple and puts the work in the definitions: a new source can change many of them. LAV makes adding a source local and puts the work in query answering. The general form, with a conjunction of source atoms in the body and a conjunction of global atoms in the head, contains both. It is the source-to-target tgd of data exchange, where the target is built instead of left virtual.
Examples
The global schema has , a flight leg from to . Source Direct lists some direct routes. Source TwoHop lists pairs of cities with a connection through exactly one unnamed stop. The data is and .
LAV. The descriptions are
Every possible world contains , and for some value . The query has the certain answer , along . The rewriting over the sources finds it. The query has only the certain answer , because the stop is unknown.
GAV. A global relation must be a query over the sources, so the unnamed stop of TwoHop cannot become a Route fact. A GAV design adds a global relation for "a connection with one stop" and defines
A query over Conn2 unfolds to the union of TwoHop and the self-join of Direct. A new source of three-leg trips means a new global relation and new definitions.
Where it is used
- Mediator systems. Early research mediators each took one side: some defined the global relations over the sources, others described each source over a global schema. The book of Doan, Halevy and Ives compares both and the general form.
- Data exchange. The same dependencies, read as rules to build a target instance, define the data exchange problem.
- Ontology-based data access. Systems that answer queries over an ontology often map the data to the ontology with GAV rules and leave the incomplete part to the ontology; see ontology-mediated query answering.
- Query rewriting with views. LAV query answering is the theory behind rewriting queries with materialized views.
References
- Maurizio Lenzerini, Data integration: a theoretical perspective, PODS 2002, pages 233-246, the GAV and LAV approaches and sound, complete and exact sources
- AnHai Doan, Alon Halevy and Zachary Ives, Principles of Data Integration, Morgan Kaufmann, 2012, Chapter 3, Describing Data Sources
- Serge Abiteboul and Oliver M. Duschka, Complexity of answering queries using materialized views, PODS 1998, pages 254-263, the open and the closed world assumption
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag A26C5V Edit this page History Report an error Markdown