Sunday, June 1, 2014

May Post @All Analytics


Big Data, Normalization & Analytics



Do you like this post? Please link back to this article by copying one of the codes below.

URL: HTML link code: BB (forum) link code:

6 comments:

  1. Fabian, example in that article is plain wrong.
    Fig 3 -- Query joining the three tables does NOT have that extra row.

    The query

    select Manufacturer, Product,Retailer
    from T1 natural join T2 natural join T3 ;

    returns the original table (Fig 1).

    ----

    To get the table in Fig 3 one needs to

    select Manufacturer, Retailer, Product
    from T1 natural join T3;

    Which would mean something like:

    If a manufacturer makes a product and a retailer carries that product then that retailer carries that product for that manufacturer.

    Which puts a retailer in a weird position indeed.

    ReplyDelete
    Replies
    1. I do read (and like) All Analytics, but I am not willing to provide all the registration info they require; so, can not comment there.

      Delete
    2. In my follow-up posts--there will be two--I will address the join mistake.

      The points of the post are, however, that

      1. If you dk tables' interpretation--what they mean--and specifically column dependencies, then any operation on them can result in wrong results.

      2. NF's are established from dependencies, not the other way around and sheer visual inspection of tables is likely to lead you astray.

      Delete
    3. @Damir:
      1. Congratulations on spotting that.
      2. But the illustration being wrong doesn't affect the arguments.
      3. Per the article the rows in the original satisfy "the enterprise is sanctioned to distribute [M]’s product [P] to [R]" or for short
      ... [M] 's product [P] to [R]
      so
      select Manufacturer, Retailer, Product
      from T1 natural join T3;
      is rows where
      exists R: ... [M] 's product [P] to [R]
      and exists M: ...[M] 's product [P] to [R]
      ie
      ... some product of [M]'s product to [R]
      and some manufacturer's product [P] to [R]

      Delete
    4. Those last two lines should be:
      ... [M]'s product [P] to some retailer
      and some manufacturer's product [P] to [R]

      Delete
  2. I sympathize re account info--I dislike it too--but in this case is for a good cause: continuation of my blog there. The more people participate, the less likely they will drop the blog.

    So as a favor to me, pls hold your nose and register and comment. You'll be also helping with education.

    Thanks.

    ReplyDelete