Reporting duplicate entry for a given set of data
String.equals() compare their char[] inside, which is slower than simply compare two ints.
String concatenation is slower than creating a Database.
String.hashcode() is just like its equals.


Note that your implementation of Database.equals is incorrect, though you're lucky this time.

@Override
public boolean equals(Object obj) {
    return (obj instanceof Database) &amp;&amp; ID == ((Database)obj).ID &amp;&amp;
            SC == ((Database)obj).SC;
}


The hashcode implementation is only a suggestion.

@Override
public int hashCode() {
    return 31 * (31 * 17 + ID) + SC;
}