implement database getter