HaskRel aims to define those elements of the relational theory of database
management that Haskell can accommodate, thus enabling Haskell (or more
precisely GHC) in its own right as a DBMS with first-class support for those
parts of the relational model. It does not qualify as a proper RDBMS since it
as-is only defines the relational algebra, relational variables and relational
assignment. It does not define the relational calculus, views, constraints and
transactions (beyond the fundamental requirement that the tuples of relations
are to be unique), certain operators like relation valued aggregate operators,
nor a few minor or even deprecated operators such as DIVIDE. The implemented
parts are decently complete even if there are major implementation
shortcomings that prevent this from being practically usable as an actual
DBMS.
I refer to it as "first-class" since the types of the relational model are
first-class types to Haskell, and the Haskell type system is able to induce
the type resulting of relational expressions (for instance that a natural join
of two relations results in a relation with a heading that is the setwise
union of the headings of the original relations).
The HaskRel library
Not all modules of this library are relevant to gain an understanding of how
it functions, the next part to go to at this point is
Database.HaskRel.RDBMS
, and the modules it reexports. See also README.md.