Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

database - Normalisation 1NF

I thought I understood normalization and now realising I'm not sure if I do. Basically, the internet is showing different ways of doing it!?

For 1NF, some articles say to remove repeating groups, and while doing so, bring a copy of the original entity's primary key to the new entity and create a composite primary key. However, other articles tell me to remove repeating groups, and while doing so, leave a foreign key in the first table and have a (non-composite) primary key in the new table (this FK and PK are the same).

I have included screenshots as examples.

I am unsure of which way is correct as they'd both give different results? I always thought it was the first way.. Can anyone explain please?

First: way

1st way

Second way:

2nd way

Second way again:

3nd way

4th way


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...