Piotr Koller
Piotr Koller

Reputation: 621

Is this a 3NF violation?

I want to create a database with counties + lakes and rivers located within them. Is this a 3NF violation if I have a table "lakes" with following attributes:

or perhaps "area" and "depth" should be in another table like "measurements" connected by the foreign key?

Upvotes: 0

Views: 178

Answers (1)

Ross Bush
Ross Bush

Reputation: 15175

3rd normal form is a little different. 3NF would apply to a table where you wanted to record historical lake levels.

LakeLevel

  • id (PK)
  • name
  • area
  • depth
  • Year

If you did not include the year then the Lake table would be in 3NF because all attributes pertain directly to the entity the PK in drawn against. When you add year, the area/depth and I guess name too, could describe both the lake and the attributes pertaining to another entity, the year. The LakeLevel table could be taken to the 3NF by breaking it up one more time.

Upvotes: 1

Related Questions