4 Replies Latest reply: Feb 11, 2014 9:05 PM by lin ye RSS

    primary vs foreign key and change in size of tool

    lin ye

      I'm trying to understand what caused my tool size to go up. say I have 3 tables link like below: A-B-C

      A and B are linked by key_a, B and C are linked by key_c.  In other words, table B has both key_a and key_c


      say below is the count of records in each table

      row(A)=10, row(B)=100,row(C)=20

      and if I count (key_a), I get 10.


      Now I am making a switch, so table A became the center table: B-A-C

      row of each table remain the same. row(A)=10, row(B)=100,row(C)=20

      Table A now has both key_a and key_c, but table B only has key_a

      but when I do count(key_a), I get 100.


      Why? does qlikview store only one key in each table? but that makes no sense, how would it know the association in the other table.