db module decoupled & metaclassed