Database Reference
InDepth Information
α
are conjunctions of equalities and inequalities
(see
Definition 11.3
on page
146
and
Definition 11.10
on page
154
).
Now, just like in the relational case we write SO tgds as rules using function symbols.
This means that in a rule
π
are patterns, and
where
π
and
α
and
π
∧
α
, the patterns
π
can contain expressions
π
∧
α
−→ ∃
z
π
,
of the form
(
t
1
,
t
2
,...,
t
k
)
where
t
1
,
t
2
,...,
t
k
are terms over some set of function symbols and variables. Similarly,
α
α
can contain equalities and inequalities between terms.
For a valuation of function symbols
f
and a valuation of variables (a tuple)
a
and
=
(
t
1
,
t
2
,...,
t
k
)[
f
,
a
]
T
,
v

if
v
has the label
and stores the tuple
t
1
[
f
,
a
]
,
t
2
[
f
,
a
]
,...,
t
k
[
f
,
a
] where
t
i
[
f
,
a
] is the value
of the term
t
i
when the function symbols are interpreted according to
f
and the variables
according to
a
. The general notion of satisfaction for patterns,
[
f
,
a
]
,
T

=
π
is obtained just like for the case without function symbols.
For a mapping
M
=(
S
s
,S
t
,
Σ
st
) using function symbols, (
T
,
T
)
∈
M
if there exist
functions
f
such that for each
[
f
,
a
].
We indicate the availability of function symbols in the mappings by including F
UN
in the
signature in the SM(
[
f
,
a
] then
T

ϕ
−→
ψ
∈
Σ
st
and each
a
,if
T

=
ϕ
=
ψ
σ
) notation, e.g., SM(
⇓
,
F
UN
).
When is XML mapping composition problematic?
We now give a few examples showing that some features of XML schema mappings cause
problems when we try to compose them. The first such feature is disjunction in schemas,
as illustrated by the following example.
Example 19.18 Let
D
1
=
{
r
→
ε
}
,
D
2
=
{
r
→
b
1

b
2
;
b
1
,
b
2
→
b
3
}
,
D
3
=
{
r
→
c
1
?
c
2
?
c
3
?
}
with no attributes present and let
r
/
c
i
i
= 1
,
2
Σ
12
=
{
r
−→
r
/ /
b
3
}
,
Σ
23
=
{
r
/
b
i
−→
}
.
Note that the source tree is just a single root node labeled
r
.Then
consists
of pairs of trees (
r
,
T
),where
T
matches either
r
/
c
1
or
r
/
c
2
. It is intuitively clear, and can be
proved formally, that such a mapping cannot be defined without disjunction over the target:
a disjunction is encoded in the intermediate schema
D
2
as the alternative
b
1

M
12
◦
M
23
b
2
,andif
this schema is removed, the disjunction should be somehow expressed with dependencies.
Note that
c
3
? is necessary in
D
3
: with the production
r
→
c
1
?
c
2
? the composition would
be definable by
r
−→
r
/
.