Search code examples
databasedatabase-designprimary-keydatabase-normalizationfirst-normal-form

reasoning that creating a primary key satisfies the first normal form


I am studying for the Microsoft Technology Exam and one of the practice questions is:

Creating a primary key satisfies the first normal form. True or False?

It seems False because first normal form is rid of duplicate groups. But the text (Database Fundamentals, Exam 98-364 by Microsoft Press) says:

The first normalized form (1NF) means the data is in an entity format, which basically means that the following three conditions must be met:
• The table must have no duplicate records. Once you have defined a primary key for the table, you have met the first normalized form criterion.

What is wrong with my reasoning?


Solution

  • A primary key must be completely unique. So once this is part of a record, it is distinct from any other record.

    eg.

    Record 1
    ---------
    KEY = 1
    Name = Fred Boggs
    Age = 84
    
    
    Record 2
    --------
    KEY = 2
    Name = Fred Boggs
    Age = 84
    

    These 2 records are different because the field KEY is different. Therefore although the rest of the data is the same, it meets the requirements for 1NF.