database and entities configuration