These little programs are often executed when a report is formatted or in response to an event, like clicking a button or saving a record. When you add validation rules after there is already data in a table, it would be nice to check that the existing data abides by the rules before you save the table.
Whereabouts in the application should the business logic of data-validation checks be made?
When I'm in my controller, I don't know if the form has validated the input..that scares me - sure, I'm a big kid and should trust that I did validate the data, but with such an important piece of the puzzle I don't like to take any risks.
Macro or event procedure: Forms and reports can run little bits of programming as macros or as event procedures.One implication of having the validation in both the database and the user interface (and possibly the middleware too) is that the same logic is expressed in more than one place.In the database world, the logical duplication of the same data is generally considered to be undesirable.Of course, when you are updating data external to your organization (say placing an order over web service), then clearly the handling of errors raised by the web service must be handled in an application.More significantly, if we want to build usable systems then we have to put validation in the user interface.