Database Reference
In-Depth Information
Figure 3.4 (a) PUBLISHERS table, (b) EMPLOYEES table.
3.2.3 Linking Tables
In a data model, entities are associated by relationships. To implement these relationships in a rela-
tional database, two tables involved in a relationship should share a common column. As an exam-
ple, consider the two linked tables in Figures 3.4a and 3.4b. here is a nonidentifying relationship
between these two tables. hat is, a row of the PUBLISHERS table is related to one or more rows
in the EMPLOYEES table. his relationship can be implemented by adding the pub_ID column
to the table EMPLOYEES. he column pub_ID in the table PUBLISHERS is the primary key. It
is used to uniquely identify each row in PUBLISHERS. he column pub_ID in EMPLOYEES is
a foreign key. As a foreign key, the values in the column pub_ID in the table EMPLOYEES do not
have to be unique. In such a way, the relationship is implemented by a primary/foreign key pair.
From the functional dependency point of view, the column pub_ID in the table EMPLOYEES
is determined by the column pub_ID in the table PUBLISHERS. his functional dependency
speciies the relationship between PUBLISHERS and EMPLOYEES. Not only can a functional
dependency be used to specify a relationship, it can also be used to normalize a table structure so
that the tables can be used to build a properly deined relational database. he next section dis-
cusses table normalization.
3.3 Normalization
A relational database consists of tables and relationships. A properly designed table structure will
greatly improve database performance, reduce the size of data storage, and ensure correct database
operations. In this section, you will learn about the concepts of table structure and the process of
normalizing tables.
Search WWH ::




Custom Search