Database Reference
In-Depth Information
2. Make certain that you've properly established each relationship.
3. Make certain that each foreign key complies with the Elements of a Foreign Key.
4. Make sure that you've established an appropriate deletion rule for each relation-
ship.
5. Make certain that you've identified the proper type of participation for each table
within a dual-table relationship and for the appropriate key fields in a self-referen-
cing relationship.
6. Make certain that you've identified the proper degree of participation for each
table within a dual-table relationship and for the appropriate key fields in a self-
referencing relationship.
If all the relationships check out and everyone you're working with agrees to this assess-
ment, you can be confident that the relationships are sound and ready to be incorporated
into views.
A Final Note
The degree to which you can easily implement these three relationship characteristics de-
pends greatly upon your RDBMS. Most RDBMSs do not fully or inherently support all of
the characteristics, but they do provide some basic support for the deletion rule and type of
participation. In most cases, however, you can use SQL and programming code to imple-
ment these characteristics for any relationship in your database.
Relationship-Level Integrity
Arelationshipattains relationship-level integrity afteryou'veverifiedthatitisproperlyes-
tablished and its characteristics are suitably set. Relationship-level integrity warrants the
following.
The connection between the two tables (or key fields) in a relationship is sound.
You accomplished this by using primary and foreign key fields to establish a one-
to-one or a one-to-many relationship and a linking table to establish a many-to-
many relationship.
You can insert new records into each table in a meaningful manner. You ensured
this by designating the appropriate type of participation for each table (or key
field) within the relationship.
You can delete an existing record without producing any adverse effects. You
guaranteed this by assigning an appropriate deletion rule for the relationship.
Search WWH ::




Custom Search