POTD 1: FD, F+, Normalization

Due 6-Feb-2024, 12pm/noon EST
Purpose:

You may make a copy of a worksheet and complete this activity, or simply type your answers in any text editor.

You may work alone or with 3-4 students (max size=5) in this course.

  1. Given a relation R(title, year, length, genre, studioName) and a set of FDs
    title year -> length
    title year -> genre
    title year -> studioName   
    
    Are the above FDs equivalent to the following/single FD?
    title year -> length genre studioName
    Yes or No?
    Yes 
  2. Given a relation R(title, year, length, genre, studioName) and the following FD:
    title year -> length
    Is the above FD equivalent to the following FDs?
    title -> length
    year -> length
    Yes or No?
    No
    Title does not functionally determine length, 
    since there can be multiple movies with the same title 
    (e.g., King Kong) but of different lengths. 
    Similarly, year does not functionally determine length, 
    because there are movies of different lengths made in 
    any particular year.
  3. [optional] Consider a relation about people in the United States, including their name, Social Security number, street address, city, state, ZIP code, (phone) area code, and phone number (7 digits). What FD's would you expect to hold? What are the possible candidate keys for the relation?

    To answer this question, you need some real world facts. For example, can the same (phone) area code be used in two states? Can the same ZIP code be associated with two (phone) area codes? Can two people have the same Social Security number? Can they have the same address or phone number?

    Some possible FDs:
       Social Security number -> name
       Area code -> state
       Street address, city, state -> zipcode
    
    One possible candidate key:
       (Social Security number, street address, city, state, area code, phone number)
    
    Need street address, city, state to uniquely determine location. 
    A person could have multiple addresses. 
    The same is true for phones. 
    These days, a person could have a land line and a cellular phone
  4. Consider the following relation and functional dependencies
    R(A, B, C, D)
    FDs = { A -> B, B -> C, B -> D }
    Computer F+
    Write all LHS and remaining
       A ->
       B -> 
       C -> 
       D -> 
    Copy FDs as is
       A ->  B
       B ->   CD
       C ->
       D ->
    Apply reflexivity
       A -> AB
       B ->  BCD
       C ->   C
       D ->    D
    Apply transitivity
       A -> ABCD   
       B ->  BCD
       C ->   C
       D ->    D
    
    Thus, F+ = { A->ABCD, B->BCD, C->C, D->D } 
  5. Consider the following relation and functional dependencies
    R = (A, B, C, D, E, F)
    FDs = { B -> AC, C -> D, F -> E } 
    Computer F+
    Write all LHS and remaining
       A ->
       B -> 
       C -> 
       D -> 
       E ->
       F ->
    Copy FDs as is
       A ->  
       B -> A C
       C ->    D
       D ->
       E -> 
       F ->     E
    Apply reflexivity
       A -> A
       B -> ABC
       C ->   CD
       D ->    D
       E ->     E
       F ->     EF
    Apply transitivity
       A -> A   
       B -> ABCD
       C ->   CD
       D ->    D
       E ->     E
       F ->     EF
       
    Thus, F+ = { A->A, B->ABCD, C->CD, D->D, E->E, F->EF } 
  6. [optional] Give a scenario in which you would choose to decompose a table using 3NF (as opposed to BCNF)
    (Any examples related to needing the dependency preserving property)
  7. [optional] Give a scenario in which you would choose to decompose a table using BCNF (as opposed to 3NF)
    (Any examples related to needing the redundancy free property)


Grading rubric

[Total: 10 points]: Done (or provide evidence of your attempt, full or reasonable effort)

(-2.5 points) for 24 hours late (submitted after 6-Feb-2024 12pm EST, by 7-Feb-2024 12pm EST)
(-5 points) for 48 hours late (submitted after 7-Feb-2024 12pm EST, by 8-Feb-2024 12pm EST)


Submission



Copyright © 2024 Upsorn Praphamontripong
Released under the Creative Commons License CC-BY-NC-SA 4.0 license.
Last updated 2024-02-03 16:23