The database is your last line of defence
Constraints push business rules into the database itself. Validation in the application is helpful but optional — anyone can bypass it with a direct SQL connection or a buggy code path. Constraints are guaranteed. Every rule you push down is a rule you don't have to verify in 50 different places.
UNIQUE — no duplicates
Single-column or multi-column. Multi-column UNIQUE is the right answer for "a user can review a product at most once."
CHECK — arbitrary boolean rules
Any predicate that can be evaluated row-by-row: positive prices, valid statuses, sane percentages, lengths within limits. CHECK can reference other columns in the same row but not other rows.
EXCLUDE — overlap prevention
The most powerful and least-known constraint. EXCLUDE rejects rows whose values would conflict with existing rows under operators you choose. The classic case: prevent two reservations of the same room from overlapping in time.