Page 24 - Database-En-V3
P. 24
✓ Are all relationships between tables represented either by common fields or
through a third table?
A one-to-one relationship and a one-to-many relationship require common
columns, while many-to-many relationship requires a third table. The types of
relationships will be explained later in Section III.
8. Applying normalization rules
Normalization rules are applied to achieve all principles that mentioned above and
thus ensure the validity of the design, also information and reports. Data
normalization rules can be applied as the next step in your design. You use these rules
to see if your tables are organized and design correctly. The applied rules to a database
design are called database normalization, or normalization rules. More details are
handled in section III.
II. Relationships between tables
After you've divided data into tables, you need a way to group the data in meaningful
ways by using relationships to group the data together.
Types of relationships
1. One to one relationship:
For example, suppose you need to record some additional and special student data
that you will need rarely or that applies only to a few situations such as orphans.
You can put it in a separate table because you don't need the data frequently and
because storing that data in the Students table can result a blank space for each
student that it doesn't apply to. You can use the student ID as the primary key. The
relationship between this supplemental table and the student table is one-to-one.
For each record in the Students table, there is one matching record with the
additional table. When you define a relationship like this, the two tables must share
a common field. keep in mind that you can put data from both tables together into
one table, but you don't want to do this, because it might cause a lot of empty
space, the following list explains how to represent the relationship in the design:
• If the two tables have the same address, you can probably set up the relationship
using the same primary key in both tables.
• If the two tables have different addresses with different primary keys, choose one
of the two tables and insert its primary key into the other table as a foreign key.
17 Training unit in the field of technological information - at the Supreme Council of Universities © Intellectual property rights 2024