The relational model is an approach to information management using the semantics and formalism of first-order predicate logic. 111“The relational model for database management : version 2” by E.F. Codd . The first-order logical environment FOLE is a framework for defining the semantics and formalism of logic and databases in an integrated and coherent fashion. Hence, the relational model for information management can be framed in terms of the first-order logical environment FOLE.
Three papers are concerned with the presentation of FOLE: “The ERA of FOLE: Foundation” , which is concerned with showing how the ERA data model is represented in FOLE; “The ERA of FOLE: Superstructure” , which is concerned with the classification form of FOLE; and “The ERA of FOLE: Interpretation” which is concerned with the interpretation form of FOLE. 222As indicated in Sec. 4.4 of the FOLE foundation paper , there are at least two adjointly related approaches for the interpretation of (1) many-sorted first-order logic in general and (2) FOLE structures in particular: the traditional approach, which defines interpretations in terms of relations; and the database approach, which defines interpretations in terms of tables. The relation-table adjunction is discussed in § 0.A.1. Two papers will provide a rigorous mathematical basis for FOLE interpretation and define an architectural semantics for the relational data model: 333Older architectures of data include the hierarchical model and the network model. Of these, nothing will be said. A newer architecture of data, called the object-relational model, is a presentation form for the relational data model described here. “The FOLE Table” [this paper] and “The FOLE Database”. The latter develops the notion of a FOLE relational database as a diagram of FOLE tables. Both of these papers expand upon material found within the paper “Database Semantics” .
The current paper is concerned with the FOLE table concept. A table in the relational model is represented as an array, organized into rows and columns. The rows are called the tuples (records) of the table, whereas the columns are called the attributes of the table. The rows are indexed by keys. Both rows and columns are unordered; instead of indexing headers and tuples as -tuples, the FOLE approach uses attribute names for tuples (as advocated by Codd ). In the relational model, all components can be resolved into sets and functions. 444The relational data model is based upon the context of sets and functions.
Section 2 provides material on the basic structures underpinning the FOLE table concept: signatures, type domains and signed domains. Section 3 describes our representation for the table concept by defining the multi-path fibered context of tables 555The original discussion of FOLE (Kent ) took place within the knowledge representation community, where the term category is defined to be a division within a system of classification or a mode of existence. Hence following (Kent ), we use “mathematical context” (Goguen ) for the mathematical term “category”, “passage” for the term “functor”, and “bridge” for the term “natural transformation”. (illustrated in Tbl. 17 of § 3.5)
— one fibered path goes directly via signed domains (§ 3.2), while two other paths go indirectly via signatures (§ 3.3) and type domains (§ 3.4). Section 4 uses properties of comma contexts and the Grothendieck construction to prove that the various (sub)contexts of FOLE tables are complete (joins exist) and cocomplete (unions exist). Table 1 lists the figures and tables in this paper.
2 Table Basics
A signature, which represents the header of a relational table, provides typing for the tuples permitted in the table. 777The use of lists for signatures (and tuples) follows Codd’s recommendation to use attribute names to index the tuples of a relation instead of a numerical ordering.
Let be a sort set. The fiber mathematical context of -signatures is the comma context
associated with the sort set (constant passage) . It has the index and trivial projection passages and the defining bridge . An -object , called an -signature (header), consists of an indexing set (arity) and a map from to the set of sorts . An -morphism is an arity function that preserves signatures by satisfying the naturality condition .
The fibered context of signatures is the comma context
It has index and set projection passages and the defining bridge . A -object (signature, sort list) consists of a sort set and an -signature . A -morphism (signature morphism) consists of a sort function and an arity function satisfying the naturality condition .
This condition gives two alternate and adjoint definitions. In terms of fibers, a signature morphism consists of a sort function and either a morphism in the fiber context or a morphism in the fiber context .
The -signature morphism is the composition (Fig. 2) of the fiber morphism with the counit component for the fiber adjunction . This fiber adjunction (top part of Tbl. 2) is a component of the sort indexed adjunction of signatures .
The fibered context of signatures
is the Grothendieck construction of
the sort indexed adjunction of signatures
888A fibration (fibered context over ) (nLab ) is a passage
such that the fibers
depend (contravariantly) pseudofunctorially on .
Dually, in an opfibration the dependence is covariant.
There is an equivalence of 2-contexts
2.2 Type Domains
A type domain, which constrains the body of a relational table, is an indexed collection of data types from which a table’s tuples are chosen.
Let be a sort set.
The fiber mathematical context of -sorted type domains
999In the ERA data model
attributes are represented by a typed domain
consisting of a collection of data types.
a typed domain is represented by an attribute classification
consisting of a set of attribute types (sorts) ,
a set of attribute instances (data values) and
an attribute classification relation .
For each sort (attribute type) ,
the data domain of that type is the -extent
maps a sort to its data domain (-extent) .
The attribute list classification
has -signatures as types and
-tuples as instances,
with classification by common arity and universal -classification:
a -tuple is classified by
is classified by an-signature when and for all . is the context described as follows. An -sorted type domain consists of a data value set and a classification relation ; hence, a data-type collection , with each sort indexing the data-type . An -sorted type domain morphism is an infomorphism satisfying iff for each sort and data value ; hence, consisting of a data value function satisfying for each sort and each value ; thus, defining the restrictions . 101010More generally, let be any infomorphism. The condition is equivalent to the abstraction . Hence, there is a function that is a restriction of the instance function .
The fibered context of type domains is described as follows. A type domain is a classification; and hence consists of a sort set and an -sorted type domain . A type domain morphism is an infomophism consisting of a sort function and a data value function that satisfy the infomorphism condition iff for any source sort and target data value . This condition gives an alternate definition. In terms of fibers, a type domain morphism consists of a sort function and a morphism in the fiber context .
For any sort function ,
there is a type domain fiber passage
111111For any sort function ,
there is an inverse image fiber passage
for any source sort and target data value ;
or in terms of data types,
. This fiber passage is a component of the sort indexed context of type domains .
The fibered context of type domains (a fibration) is the Grothendieck construction of the sort indexed context of type domains .
2.3 Signed Domains
A signed domain represents both the header and the body of a relational table.
Signed domains are a fundamental component used in the definition of database tables and in the database interpretation of FOLE. Signed domains are used to denote the valid tuples for a database header (signature).
A signed (headed/typed) domain consists of a type domain with sort set and a signature (database header) . 121212Signed domains were called semidesignations in “Database Semantics” . Indeed, a signed domain is a list designation from the trivial entity classification with element signature map and empty tuple map . A signed domain morphism consists of a signature morphism and a type domain morphism with a common sort function . Hence, the mathematical context of signed domains is the comma context
associated with the sort passage . There is a sign mediating passage .
From a different point-of-view, a signed domain consists of a signature and a type domain with common sort set , and a signed domain morphism consists of a signature morphism and a type domain morphism with common sort function . Hence, can also be defined as the fibered product
for the opspan of passages .
There is a tuple passage .
The tuple passage
maps a signed domain
to its set of tuples
131313This important concept
can intuitively be regarded as the set of legal tuples under the database header
It is define to be the extent in the list type domain :
Various notations are used for this concept depending upon circumstance:
and maps a signed domain morphism
to its tuple function
or visually, .
2.4 Inclusion/Tuple Bridges
Let be a signature. There is an inclusion passage that maps an -sorted type domain to the signed domain and maps an -sorted type domain morphism to the signed domain morphism . Composition of the inclusion passage with the signed domain tuple passage (Def. 1) gives a signature tuple passage
which maps an -sorted type domain
to the tuple set
and maps an
-sorted type domain morphism (infomorphism)
to the tuple function associated with :
. 141414The tuple passage maps an -sorted type domain to the tuple set and maps an -sorted type domain morphism to the tuple function
a restriction of the tuple function .
Let be a signature morphism. There is an inclusion bridge (illustrated below right).
For any target type domain ,
the signed domain morphism
is illustrated above left. This is natural in type domain. Hence, there is an inclusion passage . Composition of the inclusion bridge with the signed domain tuple passage (Def. 1) gives a signature tuple bridge (Fig. 3)
For any target type domain , the -component of the signature tuple bridge is the tuple function . This is natural in signature. Hence, there is a tuple passage .