Realize question for database and remove unused parts