Database Reference
In-Depth Information
where, as usual, the square brackets denote the equivalence classes for terms
t i ).
B in DB sk
returns the homomorphism f H = U 1 (f ) from the Σ R -algebra U(A) into the
Σ R -algebra U(B) such that for any term o i ( [ t 1 ] ,..., [ t n ] ) U(A) , o i Σ R ,we
obtain f H (o i ( [ t 1 ] ,..., [ t n ] )) = o i (f H ( [ t 1 ] ),...,f H ( [ t n ] )) U(B) .
This universal functor U , for any simple morphism f
:
A
−→
Its adjoint forgetful functor F
DB sk such that, for any free algebra
U(A) in K , the object F(U(A)) in DB sk is equal to its carrier-set A (each term
o i (
:
K
−→
U(A) is evaluated into a relation that is an element of this
closed object A ) and for each arrow U 1 (f ) , F 1 (U 1 (f ))
[
t 1 ]
,...,
[
t
] n )
=
f , i.e., FU
=
Id DB sk
and UF
=
Id K .
Remark In this universal algebra framework, we preferred to use the skeletal cat-
egory DB sk (which will be used for the algebraic considerations in what follows),
instead of the complete category DB , equivalent to it. Note that if we use the DB
then the unique universal functor U :
DB
K is equal to the previous one, and
the adjoint forgetful functor F
:
K
DB is defined by F(U(A))
=
TA (when A
TA ), with F 1 (U(f ))
is a closed object then A
=
=
Tf and hence TA can be sub-
stituted by A because they are isomorphic ( A
TA in DB ), and Tf
:
TA
TB
is equivalent to f
:
A
B (i.e., f
Tf ) because they have the same information
fluxes, f
= Tf .
It is immediate from the universal property that the mapping A
U(A) extends
:
DB sk −→
to the endofunctor F
DB sk . This functor carries a monad structure
(F U,η,μ) with F U an equivalent version of T but for this skeletal database
category DB sk (while for the equivalent version for DB we obtain the monad T ,
as demonstrated in Proposition 58 in Sect. 8.3 ). The natural transformation η is
given by the obvious “inclusion” of A into (F
U
]
(each view (relation) R in a closed object A is an equivalence class of all algebra
terms which produce this view). The natural transformation η is the unit of this
adjunction of U and F , and hence it corresponds to an injective function
U)(A)
=
F(U(A))
:
R
−→ [
R
−→
U(A) in Set , given previously. The interpretation of μ is almost equally simple.
An element of (F
:
A
U) 2 (A) is an equivalence class of terms built up from elements
U) 2 (A)
of (F
U)(A) , so that instead of t(x 1 ,...,x k ) , a typical element of (F
[
t 1 ]
[
t k ]
is given by the equivalence class of a term t(
,...,
) . The transformation μ
is defined by 'flattening-terms' map
. This makes
sense because a substitution of provably equal expressions into the same term results
in provably equal terms.
The monadic properties of the endofunctor T = F U will be explored deeper
in Sect. 8.3 , after examination of the algebraic lattice, lfp (locally finite presentable
properties of DB category and its enrichments.
[
t(
[
t 1 ]
,...,
[
t k ]
)
]→[
t(t 1 ,...,t k )
]
= 1 j m A j , m
Remark Consider a generalization to complex objects A
2.
DB OP
A bifunctor E
:
sk ×
K
−→
Set for any complex database instance A in
DB sk generates a functor E(A, _ )
:
K
−→
Set with a universal element (U(A),) ,
Search WWH ::




Custom Search