Validation is essential to web database applications. Ensuring that data meets user and system requirements is important, but ensuring that the database constraints are met by the data is critical. There are three possible data environments in which validation can occur in a three-tiered web database application: in the DBMS, in server-side scripts, and on the client. We discuss the merits and possibilities of these approaches to validation in this chapter.
As the name suggests, client-tier validation occurs at the client
browser before a request is sent to the server and is usually
<form> data. The most common
way to implement client-tier validation is using the scripting
isn’t a fully fledged programming language, but
it’s one that can be effectively used for simple
tasks such as validation. The drawback of validation at the client is
that it depends on the user and his environment: the user can disable
and the client environment isn’t usually managed or
standardized by the developer of the web database application.
Server-side validation is usually performed in a middle-tier script and is the essential validation tool. When data is inserted, updated, or deleted at the DBMS, it’s undesirable to rely on the constraint-checking validation implicitly performed by the DBMS in the database tier. Trapping errors ...