database config and init