Add chainable database support. Issue #4.