1 Reply Latest reply: Sep 9, 2011 5:41 AM by Hamish Donald RSS

    Hierarchy Problem - recursivity between two tables

    Josue Andrade

      Hello people,

       

      I have a structure about Procuct Composition, with the following tables:

       

      Product:

      ID_Product, Info_Product, Type, Level

       

       

      Raw_Material_Composition:

      ID_Product, ID_Raw_Material, Amount

       

      SubProduct_Composition:

      ID_Product, ID_SubProduct, Amount

       

       

      The relationships between Product and the other tables are 1 x N.

       

      The problem is, the ID_SubProduct should reference the ID_Product. A Product can be composed of a lot of raw materials and a lot of other products, and it can compose another products as well.

       

      I cannot rename this field to ID_Product, because this will cause a cyclic reference.

       

      How can I make this relationship ? Can Hierarchy resolve my problem ? How can I do that ?

      Any help is much appreciated !!

       

      Thanks in advance,

      Josué