added database comparison mechanism