first methods for db