Config database and create domain class