A comparator of two databases implemented in java.