Why unique index is used over unique constraints?
It’s rare that you would. Occasionally people want to enforce uniqueness over a subset of the table - like if you want to ensure a maximum of one active record (for a given id) at any given time but allow for multiple historical records (for the same id) on the same table.
David J.