Database Reference
In-Depth Information
Analogously to the method applied in Sect. 4.2.3 , we will introduce a new aux-
iliary schema
G F =
G
(S G ,
) that has the same relations of the global schema
but
I
without integrity constraints, in order that the instance-database can F (
,D) (which
is not a model of
G F .
Another motivation for concentrating on canonical solutions is a view [ 15 ] that
many logic programs are appropriately thought of as having two components, an
intensional database (IDB) that represents the reasoning component, and the exten-
sional database (EDB) that represents a collection of facts. Over the course of time,
we can “apply” the same IDB to many quite different EDBs. In this context, it makes
sense to think of the IDB as implicitly defining a transformation from an EDB to a
set of derived facts: we would like the set of derived facts to be the canonical model.
Now we will construct inductively the revisited canonical database model
can F (
G
because does not satisfy all constraints in Σ G ) is a model of
) and re-
peatedly applying the following rule (analog to the rule (FR) in Sect. 4.2.3 ):
(FRF) if
I
,
D
) over the domain
U =
dom
SK by starting from ret(
I
,
D
h ,and
d i 1 ,...,d i h π K ( r 2 can F ( I ,D) ) ,where K = i 1 ,...,i h is an ordered sequence of in-
dexes in key(r 2 ) , and the foreign key constraint π K (r 1 ) π K (r 2 ) is in Σ T G , then insert
in r 2 can F ( I ,D) the tuple t = d 1 ,...,d ar(r 2 ) such that
π K ( { t } ) = d i 1 ,...,d i h ,and
for each i such that 1 i ar(r 2 ) ,and i not in K , π i ( { t } ) = ω k ,where π i is the i th
projection and ω k is a fresh marked null value.
Note that the above rule does enforce the satisfaction of the foreign key constraint
π K (r 1 )
d i 1 ,...,d i h
π K (
r 1
,D) ) , with d i m
dom for each 1
m
can F (
I
π K (r 2 ) , by adding a suitable tuple in r 2 : the key of the new tuple is deter-
mined by the values in π K (r 1 ) , and the values of the non-key attributes are formed
by means of the fresh marked values ω k by ordering k
=
0 , 1 ,... during the appli-
cation of the rule above.
Let us denote by Σ FRF the set of all rules (FRF) above, obtained from foreign
key constraints in Σ tgd
G
. This set of rules Σ FRF defines the
“immediate consequence” monotonic operator T B defined by:
of the global schema
G
A
T B (I)
=
I
|
A
B
,A
A 1 ∧···∧
A n is a ground instance
G
I ,
of a rule in Σ FRF and
{
A 1 ,...,A n }∈
where at the beginning I is the set of ground atoms r( d ) for each tuple d
r ret( I , D ) , and B G
is a Herbrand base for the global schema
G F . Thus, can F ( I , D )
is a least fixpoint of this immediate consequence operator.
Hence, we define the model α of this data integration system
I
, with finite source
database α (
D , finite canonical instance-database α (
S
)
=
G F )
=
can F (
I
,D) and
(possibly infinite) α (
G
)
=
can(
I
,D) , with the schema mappings similar to those
defined in Sect. 4.2.3 :
1. M SG F =
MakeOperads(TgdsToSOtgd(
M
))
: S −→ G F ,
O(r i ,r i ) for each r i G F and the
2. M G F G ={
q i |
q i =
(( _ ) 1 ( x i )
( _ )( x i ))
same relation r i G }∪{
1 r }: G F −→ G
that represents the inclusion between
finite instance-database can F (
I
,D) and the complete canonical global database
I
can(
,D) which satisfies all constraints in Σ G ,
Search WWH ::




Custom Search