added some functors to create and use a database table, to use in replacement of the current settings and data_state (maybe also for the catalog). I had to twist a little bit the ocaml type system in the implementation, and it works with a simple but non trivial example