bacalhau_codd.jpg

CoddFish

CoddFish is a Haskell library that offers strongly-typed support for database programming.

Documentation

CoddFish makes extensive use of heterogenous collections and type-level programming.

HETEROGENEOUS COLLECTIONS

A relational database is modeled as a heterogeneous collection of tables. A table, in turn, is modeled as a heterogeneous collection of attributes (the header of the table) and a Map of key values to non-key values (the rows of the table). Both the key and non-key values are stored again in a heterogeneous collection. In addition, heterogeneous collections are used to model the arguments and results of database operations, and to model functional dependencies.

TYPE-LEVEL PROGRAMMING

Type-level programming is used to maintain the consistency between header and rows, and between functional dependencies and tables. Type-level predicates are provided to check whether tables and functional dependencies are in particular normal-forms, or not.

RESEARCH PAPER

The essentials of CoddFish are described in the following paper:

  • Alexandra Silva and Joost Visser, Strong Types for Relational Databases (Functional Pearl). In Proceedings of Haskell Workshop 2006, to appear. pdf

API

Generated documentation of the API of CoddFish will appear here.

Downloads.

CoddFish is a sub-library of the UMinho Haskell Libraries. A stand-alone release is also available:

Credits

Related links


blog stats