Databases Reference
In-Depth Information
FOR EXAMPLE
Multitier Application Design
Designing a multitier database application doesn't necessarily mean designing
a Web application for use on the Internet. Larger companies often find it appro-
priate to design enterprise applications that use a multi-tier design, but the con-
cepts involved are similar to those already discussed for a Web application.
Suppose you have completed the database design and implemented a
preliminary version on a development server. Several applications will use
this database, including the one in this example, a data entry application.
Let's start with a little background and a few requirements. The database will
be used in a nationwide medical study. Study candidates fill out a ten-page
questionnaire. The answers are entered into a tracking database that will also
track other medical information.
The application you're designing is a data entry application that will enter
the survey results. Because of security requirements, end-user client comput-
ers cannot connect directly with the database server. The client computer will
do initial data validation, with more advanced checks handled by a server appli-
cation and, where appropriate, table and row constraints used as a final line
of defense. After normalization, you have four tables involved, each holding
part of the data. To understand your responsibilities, look at the application as
having three distinct, but related components. These components are the client
running on end-user computers, a middle component running on an applica-
tion server, and a server component on the database server.
The client component performs initial validation before sending the data
to the middle component and receives results or error information back from
the middle component. You need to provide data requirements such as the
types of data needed by the database and any limits such as field length or
maximum and minimum values.
The middle component accepts data from the client and uses it to pass
commands to the database server. In this example, assume that you've cre-
ated user stored procedures on the server to perform the data entry, one pro-
cedure for each of the four tables. The middle component connects to the
database server and calls these procedures, passing the data from the client
as input parameters. It will receive back any response, such as possible errors,
from the database server. As you get closer to the server, your responsibili-
ties increase. You probably need to provide guidelines for connecting to the
database server, connection parameters, the procedure names, and procedure
syntax which is probably limited to the order in which you must pass the
input parameters. You may also need to provide assistance and guidelines
relating to decoding and responding to server errors.
Continued
Search WWH ::




Custom Search