Databases Reference
In-Depth Information
to data retrieval. If you regularly need the joined data, you could find it more
efficient in the long run to denormalize the data, combine two or more nor-
malized data tables into one less normalized table. For example, you might need
to draw on data from three or four different tables to generate employee pay-
checks, including columns from an EMPLOYEE table, a TIMESHEET table, a
PAYRATE table, and other tables in a single report. You might find it better to
create a separate table named EMPLOYEEPAY that contains all of this informa-
tion. Keep in mind, however, that if you also keep all of the other tables, you
are introducing duplicate data into the database. Whether or not the perfor-
mance increase is worth the additional overhead will have to be evaluated on
a case-by-case basis.
Why the concern about performance? The more operations the database has
to perform, the greater the load on resources, which can result in performance
loss. If you create a new EMPLOYEEPAY table while also keeping the same data
in the EMPLOYEE, TIMESHEET, and PAYRATE tables, you are forcing the data-
base server to make additional updates anytime you add or modify data. If you
change a rate in the PAYRATE table or hours in the TIMESHEET table, for exam-
ple, you will also have to update records in the EMPLOYEEPAY table to reflect
these changes. Introduce too many situations where duplicate updates are needed
and performance eventually suffers.
SELF-CHECK
List and describe the three normal forms.
Explain how normalizing to the third normal form can result in addi-
tional relational tables.
Explain the meaning of the term non-loss decomposition.
SUMMARY
This chapter discussed the process of creating a relational database design. You
saw how to convert simple entities, unary relationships, and binary relationships
to relational tables. This included choosing the foreign keys needed to establish
and maintain the relationships. You compared examples in which E-R diagrams
were converted to relational tables. You also learned about the normalization
process and how apply the three normal forms.
Search WWH ::




Custom Search