SQL Strategy - A site to master SQL while executing it on the Web
Home >> Normalization strategy - Prerequisites for understanding normalization

Prerequisites for understanding normalization

This section explains the concept of functional dependencies and keys and the relationship between them, which is necessary to understand normalization.

1. the concept of functional dependence

See the table below.

customer codecustomer nameaddressphone No

The primary key is the customer code, and the other items are the customer name, address, and phone No. The relationship between the primary key and other items is called functional dependence.

To add a little more detail, if y=x (a function in elementary mathematics) and x is, say, 1, then y is 1. y=2x, then x is 1 and y is 2. Well, of course, if x is determined, then y is determined. This state of affairs is called y being functionally dependent on x.

Similarly, once the customer code is determined, the customer name, address, and phone No. are determined. In other words, the customer name, address, and phone number are functionally dependent on the customer code.

2. About the keys

A relational database consists of keys and other items. The key is the item on the side of the function dependencies described earlier, where the other values are determined once the key is known.

There are several types of keys. A key item that can identify a record from a table is called a candidate key. The central key item is called the primary key. A key item may consist of a single item or a combination of items.

Take bank accounts, for example...


  • Account number are unique and can identify customers.
  • The store number and customer number are unique and can be used to identify the customer.
account numberstore numbercustomer numberNameaddressbalance

In this case, the candidate key is a combination of the account number, store number, and customer number.

The primary key is one of these, so if the table is, for example, account information, the account number is the primary key, and if it is a customer table, the store number and customer number are the primary keys.

3. function dependencies and key relationships

A normalized table has only key entries and other entries. Conversely, normalization is the process of reducing a table to its primary key and its functional dependencies.

In this section, we have discussed functional dependencies, keys and their relationships. This completes the basic concepts for learning normalization.