I am currently studying SQL normal forms.
Lets say I have the following table the primary key is userid
userid FirstName LastName Phone
1 John Smith 555-555
1 Tim Jack 432-213
2 Sarah Mit 454-541
3 Tom jones 987-125
The book I'm reading states the following conditions must be true in order for a table to be in 1st normal form.
- Rows contain data about an entity.
- Columns contain data about attributes of the entities.
- All entries in a column are of the same kind.
- Each column has a unique name.
- Cells of the table hold a single value.
- The order of the columns is unimportant.
- The order of the rows is unimportant.
- No two rows may be identical.
- A primary key Must be assigned
I'm not sure if my table violates the 8th rule No two rows may be identical.
Because the first two records in my table
1 John Smith 555-555
1 Tim Jack 432-213
share the same userid does that mean that they are considered duplicate rows?
Or does duplicate records mean that every peace of data in the row has to be the same for the record to be considered a duplicate row see example below?
1 John Smith 555-555
1 John Smith 555-555
EDIT1: Sorry for the confusion
The question I was trying to ask is simple
Is this table below in 1st normal form?
userid FirstName LastName Phone
1 John Smith 555-555
1 Tim Jack 432-213
2 Sarah Mit 454-541
3 Tom jones 987-125
Based on the 9 rules given in the textbook I think it is but I wasn't sure that
if rule 8 No two rows may be identical
was being violated because of two records that use the same primary key.
The class text book and prof isn't really that clear on this subject which is why I am asking this question.