@@ -118,34 +118,57 @@ The ``DBType`` subtypes
118118``DBEq``
119119^^^^^^^^
120120
121−.. todo::
122−
123− Document this
121+The ``DBEq`` type class represents the subclass of database types that support
122+equality. By supporting equality, we mean that a type supports the ``=``
123+operator, and also has a suitable notion of equality for operations like
124+``GROUP BY`` and ``DISTINCT``. On the one hand, this class is like Haskell's
125+``Eq`` type class. The main difference is that this class has no methods.
124126
125127``DBOrd``
126128^^^^^^^^^
127129
128−.. todo::
130+The ``DBOrd`` type class represents the subclass of database types that support
131+the normal comparison operators - ``<``, ``<=``, ``>=`` and ``>``.
132+
133+``DBMax`` and ``DBMin``
134+^^^^^^^^^^^^^^^^^^^^^^^
129135
130− Write this
136+The type classes indicate that a database type supports the ``min()`` and
137+``max()`` aggregation functions.
131138
132139``DBSemigroup`` and ``DBMonoid``
133140^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134141
135−.. todo::
136−
137− Write this
142+These type classes exist to give Rel8's API a similar feel to Haskell
143+programming. Many database types have a sensible monoid structure, with the
144+presence of a ``mempty``-like expression, and an associative operation to
145+combine ``Expr``\s.
138146
139147``DBNum``, ``DBIntegral`` and ``DBFractional``
140148^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141149
142−.. todo::
150+These type classes are used to present a familiar numeric type hierarchy for
151+Haskell programmers.
143152
144− Write this
153+``DBNum``
154+ This class indicates that a type supports the ``+``, ``-``, and ``*``
155+ operators, along with the ``abs()``, ``negate()`` and ``sign()`` functions.
156+ Database types that are instances of ``DBNum`` allow ``Num (Expr a)`` to be
157+ used (allowing you to combine expressions with Haskell's normal ``+``
158+ function).
159+
160+``DBIntegral``
161+ If a type is an instance of ``DBIntegral``, it means that the type stores
162+ integral (whole) numbers. The ``Rel8.Expr.Num`` module provides familiar
163+ ``Expr`` functions like ``fromIntegral`` to convert between types.
164+
165+``DBFractional``
166+ If a type is an instance of ``DBFraction``, it means that the type supports
167+ the ``/`` operator, and literals can be created via Haskell's ``Rational``
168+ type class. This type class provides the ``Fracitonal (Expr a)`` instance.
145169
146170``DBString``
147171^^^^^^^^^^^^
148172
149−.. todo::
150−
151− Write this
173+This type class indicates that a database type supports the ``string_agg()``
174+aggregation function.