Ive got a question regarding the validation of uniqueness.
From : http://guides.rubyonrails.org/active_record_validations_callbacks.html#uniqueness
"It does not create a uniqueness constraint in the database, so it may happen that two different database connections create two records with the same value for a column that you intend to be unique. To avoid that, you must create a unique index in your database."
Does that mean whenever I validate uniqueness I have to add an index in the database? Or is this only necessary when its likely to happen that two recors are going to be inserted at the same time?
Whats the best practice here: Unique and Index always together or dependant on the situation?