Virtusa interview question

how are triggers and constraints different while updating an sql database?