5 Replies Latest reply: Dec 5, 2013 9:51 AM by Friedrich Hofmann RSS

    Question on link table

    Friedrich Hofmann

      Hi,

       

      in one of my apps displaying personell_data, I have now introduced a link_table linking six or so tables where the personell_ID and the corresp. mapped fields for plant and area are always the same.

      The individual data tables are all linked to that via a compound key made up of (personell_ID&'|' Date).

      Only one table is linked merely via the date because in that table the mapped_fields for plant and area would not make sense.

       

      Currently, however, what I do is load RESIDENT from all of the data tables and concatenating all those RES. LOADs into one large link_table.

       

      => I would like to join them instead to have a much shorter link_table

      <=> I am unsure about that because the size of the tables does differ insofar as for some tables I take into account all employees and for others I take into account only the hourly employees, which are approx. 100 fewer.

      - other than that, the fields I extract into the mapping table are always the same - identical even, to all probability . but for the nr. of records.

      => Every record in the linking table would then have a date, a personell_ID, several keys (one for each data table) and the mapped_fields for plant and area.

      => Will that difference in the nr. of records in the data tables lead to problems or can I replace my concatenations by JOINs?

      (I guess with a LEFT JOIN, I would just get blanks - one blank keyfield, that would be - in the records which I don't have in that particular data_table, no? That wouldn't be a problem, would it?)

       

      Thanks a lot!

      Best regards,

       

      DataNibbler