Making logically unique entity attributes unique in the database