Implement db interface for test