I'll write more about it later, but silicon actually has a nice way to deal with databases. It currently only support sqlite, but it has:
- a sqlite middleware: See the example here: https://github.com/matt-42/silicon#middlewares
- a sqlite ORM middleware: https://github.com/matt-42/silicon/blob/master/silicon/sqlit...
- a generic CRUD implementation (relying on the ORM): https://github.com/matt-42/silicon/blob/master/tests/crud.cc
The mysql, redis, postgresql equivalents will come soon.