Database Reference
In-Depth Information
Figure 12.2. Information from the EMPLOYEE PHONE LIST view
You can modify the data within a single-table data view at any time, and the modifications
you make will flow through the view and into the base table. Keep in mind, however, that
field specifications and business rules will determine what types of modifications you can
make to the data. For example, you won't be able to delete a last name in the EMPLOYEE
PHONE LIST view if the Null Support element of the field specification for the E MP L AST
N AME field is set to “No Nulls.”
Note
View implementation varies to some degree among most RDBMS software. Make
sure you examine your RDBMS's documentation to determine how fully the
RDBMSsupportsviewsandwhattypesofconstraints itimposes(ifany)onmodi-
fying the data in a view.
Multitable Data View
As I mentioned at the beginning of this section, you can define a data view using two or
more tables. The only requirement is that the tables you use to create the view must bear a
relationship to each other; this helps ensure that the information the view presents is both
valid and meaningful. For example, assume you're designing a database for a local com-
munity college and that the tables in Figure 12.3 are part of the database. You've just de-
cided that you need to create a view called CLASS ROSTER that shows the name of each
classandthenamesofthestudentswhoarecurrentlyregisteredtoattendit.Thiswillbean
easy task for you to perform because you can use the three tables as the basis of the view;
they contain the fields that you need to define the view and they bear a relationship to one
another.
Search WWH ::




Custom Search