Database Reference
In-Depth Information
hence for any two objects (instance-databases) in DB , the objects A
×
B and A
+
B
are equal (up to isomorphism).
Given a database mapping system represented by a logic-graph G
=
(V G ,E G ) ,
in Definition 14 , with a set of vertices V G that are the database schemas and a set of
edges E G such that each schema mapping
M E G is a singleton set with SOtgd
as the unique element (or alternatively, the empty set), we derive its sketch-graph
G (by substituting each edge
M AB ={ Φ }: A B
of G by the algebraic-edge
represented by a mapping-operad M AB =
, which is
a set of operad's operations) and we denote the sketch category obtained from this
graph G by Sch (G) .
This is a fundamental choice in order to have a coherent functorial semantics
for the database mappings in the Categorical logic in which the models of a given
database-mapping sketch-graph G are the R-algebras (mapping-interpretations in
Definition 11 ) for the set of all operad's operations used in the morphisms of the
sketch category Sch (G) .
More details of the transformation of a database-mapping graph G (where the
edges are SOtgds) into its sketch category Sch (G) (where each morphism is the
set of operad's operations obtained from the corresponding mapping SOtgd) will
be presented in Chap. 4 dedicated to the functorial semantics for database schema
mappings, with a number of applications as well.
MakeOperads( M AB ) : A B
3.1.2 Atomic Sketch's Database Mappings
Based on considerations in Sect. 2.6 for schema mappings and in Sect. 3.1.1 for the
sketches, we can formally introduce a theory for the basic (or atomic) mappings of
sketches. In what follows, for each schema
A =
(S A A ) we introduce its power-
schema A =
(S A
,
) such that S A ={
r
|
r
=
rsym(q( x )),q( x )
L A }
is the set of
relational symbols obtained from a countable set
L A of views (each view is a union
of conjunctive queries) q( x ) for a given schema
A
(introduced in Sect. 1.4.1 ). The
function rsym
: L A →R
assigns a particular relational k -ary symbol to each such a
view so that for each r
S A , rsym(r( x ))
=
r . The interpretation for a power-schema
relations is fixed by α(rsym(q( x )))
=
q( x )
α ( A ) . Thus, for a given interpretation
) , α ( A
α (
α (
α such that A
=
A
)
=
{
rsym(q( x ))
|
q( x )
L A }
)
={
q( x )
A |
q( x )
α (
A α A
L A }=
TA
=
) .
Definition 17 We define the following two types of simple atomic sketch's arrows
(or schema mappings) from a source schema
A = (S A A ) :
1. V IEW - MAPPING —used for the queries and inter-schema database mappings:
For any single conjunctive query q i ( x i ) over a schema
A
with relational sym-
bols in
{ r i 1 ,...,r ik }⊆ S A , we can define a schema mapping-operad's opera-
tion q i =
O(r i 1 ,...,r ik ,r q ) .
If this operad's operation q i is only a query over
v i ·
q A,i with q A,i
1 r q
O(r q ,r q ) is the identity operation, and this query can be represented by an
atomic mapping M A A ={
A
then v i =
q i , 1 r }=
MakeOperads(
{∀
x i (q i ( x i )
r q ( x i ))
}
)
:
Search WWH ::




Custom Search