A library to generate models from a database?

Btw, speaking of data types, I noticed you are using Bignum to map DECIMAL type; now that Jane Street has open sourced Bigdecimal, you may want to consider using that: OCaml needs an arbitrary-precision decimal type