2

I am trying to understand 1st and 2nd normal forms and I see lots of seemingly conflicting information, or just different sets of requirements which leaves me confused. I have a table that I want to get into 2NF.

So far I understand that every field needs to be atomic to achieve 1NF and every field in a column needs to be of the same type.

Let's take this zoo visit table as an example:

Animal  Date        Minutes_watched Type_of_exhibit Biome Area  
Lion    10/10/2020  10      Regular     Sahara     1
Giraffe 10/10/2020  20      Special     Sahara     1
Python  4/10/2020   15      Regular     Jungle     2
Penguins4/10/2020   15      Regular     Arctic     3
Lion    10/10/2020  12      Regular     Sahara     1

My two main questions are, does there need to be a unique primary key for 1NF? And Can there be repeating groups of data in 1NF like there is above (with the two Lion rows, or with biome and area relationship)?

This top-rated SO post says 1NF just disallows non-nested tables. which suggests to me the above table is in 1NF.

This geeksforgeeks.org article states there are 4 requirements:

  1. There are only Single Valued Attributes.
  2. Attribute Domain does not change.
  3. There is a unique name for every Attribute/Column.
  4. The order in which data is stored does not matter.

Which says nothing about repeating groups or PKey but has 4 other requirements. Still seems like the example is in 1NF.

Then there is this article that has 4 requirements: Define the data items required, because they become the columns in a table.

  1. Define the data items required, because they become the columns in a table.
  2. Place the related data items in a table.
  3. Ensure that there are no repeating groups of data.
  4. Ensure that there is a primary key.

1 & 2 seem like they can reduce to data having the same type, but it says there should be no repeating groups of data and that there needs to be a primary key which the first two don't seem to require. So the examples is not in 1NF.

https://docs.microsoft.com/en-us/office/troubleshoot/access/database-normalization-description#first-normal-form:

  1. Eliminate repeating groups in individual tables.
  2. Create a separate table for each set of related data.
  3. Identify each set of related data with a primary key.

Again, suggests it's not in 1NF.

Are primary keys required or not? Are groups of data like Lions in the example in 1NF or not? Is there a definitive list of requirements?

1
  • "two main questions"--ask 1 (clear specific researched non-duplicate) question. PS The web is poor resource. Follow a textbook-written by someone or some people who have earned a professorship & whose textbook has been vetted by an editor. Nevertheless, the relational model has a lot of poor textbooks & especially the term PS "1NF" has many meanings. (All involve replacing some table with parameterized structure by some table(s) with a column per parameter.) So do "unnormalized" & "UNF" & "0NF" & for that matter "relation".
    – philipxy
    Sep 16 at 7:30
2

“Is there a definitive list of requirements?”: no. The reason is that it is considered by a number of researchers as integral part of the definition of the Relational Data Model (i.e. in the RDM you have relations, not tables, and values are not compound). For others, instead, you can have relations with compound values, and the 1NF is an additional constraints (on the relational model) to exclude such kind of relations.

Nowadays it has only an historical interest. Here is the link to the original article where it was introduced: A Relational Model of Data for Large Shared Data Banks, and noting that it is described in the contest of the definition of the Relational Data Model I think it could be considered as part of the definition of the model. Note, in the article, that it was simply called Normal Form, and the name 1NF was given by other researchers when the other normal forms where introduced.

1
  • Codd named it 1NF & first researched "further normalizatioon of the data base relational model" (1971 paper).
    – philipxy
    Sep 11 at 3:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.