database configuration and simple service and repository