Search code examples
mysqldatabasedatabase-designnormalizationdatabase-normalization

Data Normalisation cannot reach 3nf


Hi I'm currently trying to normalise my data from a scenario through to 3NF. Have got this far but not really sure if its correct as I don't really know how to proceed from 2nf to 3nf ... any help would be much appreciated.

UNF

* Property ID
* Weekly Rate
* Property Type (repeating)
* Location (Repeating)
* owner (repeating)
* owner address (repeating)
* no of rooms (repeating)
* kitchen(repeating)

1NF

* Property ID (PK)
* Weekly Rate

----------


* Owner (PK)
* Property ID (FK)
* Location
* Property Type
* Owner Address
* No Of Rooms
* Kitchen

2NF

* Property ID (PK)
* Weekly Rate


----------


* Owner (PK)
* Property ID (FK)
* Owner Address


----------


* Property ID (PK)
* Location
* Property Type
* No of Rooms
* Kitchen

this is as far as i have got not really sure how to get this into 3nf and not sure if having property ID as the (PK) in two tables is correct?


Solution

  • 3NF = 2NF + no non-key attributes that depend on another non-key attribute

    Property
    -------------------
    Property ID
    Owner ID
    Location (unknown? Beach?)
    Address
    Weekly Rate
    Property Type
    No of Rooms
    Kitchen (Yay, Nay)
    
    
    
    Owner
    -------------------
    Owner ID
    Address