Database Reference
In-Depth Information
land, England. The point to remember is that you must use your best judgment when you
establish criteria for a view—use the minimum number of criteria that will cause the view
to display the records you require.
When you use a criterion in a view, you must make certain that the field you're testing in
the criterion is included in the view's structure. If you do not include the field in the view,
youhavenowayofimposingthecriterion.Thisisanimportantpointtorememberbecause
it is a requirement when you logically define a view and when you implement the view in
your RDBMS.
The one problem with applying a filter to a view is that there is no way to indicate it on a
view diagram; therefore, you must record it on a View Specifications sheet.
Using a View Specifications Sheet to Record the View
A View Specifications sheet must accompany each view diagram you create. It is on this
sheet that you will record the characteristics of the view. The View Specifications sheet
contains the following items.
Name: This is where you indicate the name of the view. Before you record the
name, however, test it against the guidelines for creating table names you learned
in Chapter 7 , Establishing Table Structures .” These guidelines govern the naming
of views as well, with one exception: The name of a view can implicitly or expli-
citly identify more than one subject. This is because you can define views from
two or more base tables, so they do, indeed, represent more than one subject.
Type: This is where you indicate whether you're defining a data, aggregate, or val-
idation view.
Base tables: This is where you specify the names of the view's base tables. Al-
though the view diagram shows these tables, they appear here as a matter of con-
venience. The View Specifications sheet does not include field names, however,
because you can record and display them more easily and efficiently on the view
diagram.
Calculated field expressions: This is where you record the expressions for the cal-
culated fields you included in the view. As you record the name of the calculated
field, test it against the guidelines for creating field names you learned in Chapter
7 . Calculated field names are governed by these guidelines with two exceptions:
You can implicitly or explicitly identify more than one characteristic in a name,
and you can use the plural form of the name. But it's still desirable to use the sin-
gular form of the name whenever possible.
Search WWH ::




Custom Search