Configures database