Main in db module