We propose a formalization of standard database management systems using topos theory. In this treatment, all constructions take place within an ambient topos, which thereby serves as the ‘universe of discourse’. A database schema is defined using objects and morphisms in the ambient topos. A database state for a given schema involves not only the ambient topos but also an internal category within the topos. This approach neatly separates the schema from the state data by placing them in distinct category structures. It is shown that database states can either be regarded syntactically as objects in an external topos or semantically as morphisms in an internal slice category. A number of operations are introduced that correspond to operations used in standard database systems. Extraction selects some of the tables, attributes and domains of a database state. The squeeze operation performs an ‘elimination of duplicates’, which can be combined with extraction to obtain an operation called ‘projection’ in standard relational database systems. A join operation is defined, which generalizes the relational join operation and can be used for the cartesian product and selection operations. Finally, ‘boolean’ operations of intersection, union and difference are introduced and related to the other operations.
[1]
Patrick C. Fischer,et al.
Nested Relational Structures
,
1986,
Adv. Comput. Res..
[2]
R. Goldblatt.
Topoi, the Categorial Analysis of Logic
,
1979
.
[3]
S. Maclane,et al.
Categories for the Working Mathematician
,
1971
.
[4]
Patricia G. Selinger,et al.
Database Technology
,
1987,
IBM Syst. J..
[5]
Gottfried Vossen.
Data models, database languages and database management systems
,
1990,
International computer science series.
[6]
Michael Barr,et al.
Category theory for computing science
,
1995,
Prentice Hall International Series in Computer Science.
[7]
Jeffrey D. Ullman,et al.
Principles Of Database And Knowledge-Base Systems
,
1979
.
[8]
S. Lane.
Categories for the Working Mathematician
,
1971
.
[9]
Peter Freyd,et al.
Aspects of topoi
,
1972,
Bulletin of the Australian Mathematical Society.