Type-safe ADT-database mapping library