Search code examples
database-normalization

DBMS NORMALIZATION 2nd Normalization Form


Voter(voter_id, voter_name, residential_address, current_city, current_state, current_postal_code).

Postal code is unique for each city and state and each address has only one postal code.

In normalization terms, Voter is in 2nf or 3nf?


Solution

  • To check its highest normal form, follow this basic steps:

    1. First rename the attributes of "Voter" for simplicity. voter_id as "A" voter_name as "B" residential_address as "C" current_city as "D" current_state as "E" current_postal_code as "F"

    2. According to given FD's : {DE -> F , C -> F }

    3.Here Candidate keys are: {ABCDE}. hence,
    Prime attributes (5): {A,B,C,D,E} , Non Prime attributes (1): {F}

    For 2NF: "Partial Dependencies are not allowed". Means, A part of candidate key should not determine a non prime attributes.

    here ,partial dependencies are : {DE -> F , C -> F }

    So, this table is not in 2NF.

    **To be into 2NF ,relation should be decompose like this:

    R1 ={DEF},

    R2 = {CF}

    R3 = {ABCDE}

    Hope this helps. For more detail like how to decompose a table and all, you can also refer : Detailed explanation of Normal forms