We are building a UI where users are allowed to make some changes. There are some restrictions on what the user can update depending on the dataset. I have been restricting users to do the invalid updates through the sproc that UI is utilizing by raising error if the input is invalid. Today my senior is asking me to create a trigger in a table to restrict the changes. I thought we should not be applying those constraints directly in databases because if we start creating triggers for all those rules we will have hundreds of triggers and constraints.
Please let me know your thoughts and how would you implement it.