database manager and wrappers