Multiple Use of the Same Attribute

It is also a problem when a single attribute can represent one of two facts, and there is no way to understand which fact it represents. For example, the EMPLOYEE entity contains the attribute “start‑or‑termination‑date” where you can record this information for an employee as follows:

The following sample instance table shows start-or-termination date:

EMPLOYEE

emp-id

emp-name

emp-address

start-or-termination-date

E1

Tom

Berkeley

January 10, 2004

E2

Don

Berkeley

May 22, 2002

E3

Bob

Princeton

March 15, 2003

E4

John

New York

September 30, 2003

E5

Carol

Berkeley

April 22, 2000

E6

George

Pittsburgh

October 15, 2002

The problem in the current design is that there is no way to record both a start date, the date that the EMPLOYEE started work, and a termination date, the date on which an EMPLOYEE left the company, in situations where both dates are known. This is because a single attribute represents two different facts. This is also a common structure in legacy COBOL systems, but one that often resulted in maintenance nightmares and misinterpretation of information.

The solution is to allow separate attributes to carry separate facts. The following figure is an attempt to correct the problem. It is still not quite right. To know the start date for an employee, for example, you have to derive what kind of date it is from the “date-type” attribute. While this may be efficient in terms of physical database space conservation, it creates confusion with query logic.

In fact, this solution actually creates a different type of normalization error, since “date-type” does not depend on “employee-id” for its existence. This is also poor design since it solves a technical problem, but does not solve the underlying business problem-how to store two facts about an employee.

When you analyze the data, you can quickly determine that it is a better solution to let each attribute carry a separate fact, as in the following figure:

The following table is a sample instance table showing “start-date” and “termination‑date”:

EMPLOYEE

emp-id

emp-name

emp-address

start-date

termination-date

E1

Tom

Berkeley

January 10, 2004

-

E2

Don

Berkeley

May 22, 2002

-

E3

Bob

Princeton

March 15, 2003

-

E4

John

New York

September 30, 2003

-

E5

Carol

Berkeley

April 22, 2000

-

E6

George

Pittsburgh

October 15, 2002

Nov 30, 2003

Each of the two previous situations contained a first normal form error. By changing the structures, an attribute now appears only once in the entity and carries only a single fact. If you make sure that all the entity and attribute names are singular and that no attribute can carry multiple facts, you have taken a large step toward assuring that a model is in first normal form.