Database Reference
In-Depth Information
R s :
FLIGHT ( ·,·,·,· ), GEO ( ·,·,· )
ROUTES ( ·,·,· ), INFO FLIGHT ( ·,·,·,· ), SERVES ( ·,·,·,· )
R t :
st )
FLIGHT(src,dest,airl,dep) −→
f# arr
ROUTES(f#,src,dest)
INFO FLIGHT(f#,dep,arr,airl)
st )
FLIGHT(city,dest,airl,dep) GEO(city,country,popul)
−→ ∃ phone SERVES(airl,city,country,phone)
st )
FLIGHT(src,city,airl,dep) GEO(city,country,popul)
−→ ∃ phone SERVES(airl,city,country,phone)
f# s d s d ROUTES ( f# , s , d ) ROUTES ( f# , s , d )
s = s d = d
t )
t )
f# s d ROUTES ( f# , s , d )
a a d INFO FLIGHT ( f# , d , a , a )
Figure 3.1 A complete schema mapping M =(R s , R t , Σ st , Σ t )
In addition, one might impose constraints on target instances, for example, keys and
foreign keys, or other database integrity constraints. Let
Σ t be a set of such constraints,
expressed by logical sentences over R t .
A schema mapping is then defined as a quadruple
M
=(R s , R t ,
Σ st ,
Σ t ) ,
or just
Σ st ), when there are no target constraints.
An example of a schema mapping was shown in Figure 1.3 on page 7 . That schema had
no target constraints. If one expands it with the rules stating that f# is a key for ROUTES
and f# occurring in INFO FLIGHT is a foreign key referencing ROUTES , one would arrive
at the complete schema mapping shown in Figure 3.1 .
M
=(R s , R t ,
3.2 Solutions
Now assume that S is a source instance , i.e., a database instance over R s .Thenatarget
instance T is called a solution for S under M
if and only if S and T together satisfy all
the stds in
Σ st ,and T satisfies all the constraints in
Σ t .Thatis, T is a solution for S under
M
if
( S , T )
|
=
Σ st and T |
=
Σ t .
For mappings without target constraints, we only require ( S , T )
|
=
Σ st .
Search WWH ::




Custom Search