Functional dependency and normalization

后端 未结 6 714
清歌不尽
清歌不尽 2021-01-31 10:44

I am trying to find a great resource to study for functional dependency and normalization.

Anyone have any idea where should I look to? I am having difficulty different

6条回答
  •  不思量自难忘°
    2021-01-31 11:30

    A functional dependency is a constraint between columns of your table. For example in the table person:

    SSN         | Name         | Date of birth | Address     | Phone number 
    ------------------------------------------------------------------------
    123-98-1234 | Cindy Cry    | 15-05-1983    | Los Angeles | 123-456-7891
    121-45-6145 | John O'Neill | 30-01-1980    | Paris       | 568-974-2562
    658-78-2369 | John Lannoy  | 30-01-1980    | Dallas      | 963-258-7413
    

    Here, the value in the column SSN (Social Security Number) determines the values in columns name, date of birth, address and phone number. This means that if we had two rows with the same value in the SSN column, then values in columns name, date of birth, address and phone number would be equal. A person with SSN 123-98-1234 is always called Cindy Cry, is born on 15-05-1983, and so on. A situation like this is called functional dependency.

    The notion of functional dependencies is used to define second, and third normal form, and the Boyce-Codd normal form (BCNF).

    To read more about functional dependencies and normalization you can go to then well-known academic books like Introduction to Databases by C.J. Date, or any of the books by the H. Garcia-Molina, J.Ullman, J.Widom trio.

    If you want a less formal approach, we're starting a series of posts on data normalization on our company blog.

提交回复
热议问题