3 Replies Latest reply: Jul 17, 2013 3:24 PM by ItachiUnited RSS

    shared tables in atg

    986851

      Hi,

       

      I was going through the document of BCC and there was a topic "Configure a Versioned Repository to Use Shared Tables".

       

      Can anybody please let me know what that shared tables actually are?

       

      Thanks,

        • 1. Re: shared tables in atg
          ItachiUnited

          Hi,


          Shared tables normally points to a table in which there are two foreign key constraints (to two other primary tables). In Versioned Repository, you cannot share a multi table with more than 2 tables. Its because, one of the foreign key should use the asset version and the other one will use the secondary asset version (shared-table-sequence=2)

           

          Table A - Primary

          Table B - Multi

          Table C - Primary

           

          B will have 5 columns here.

           

          C1 - A's ID

          C2 - A's Asset Version

          C3 - Seq Number

          C4 - C's ID

          C5 - C's Asset Version (Secondary Asset Version)

           

          Secondary Asset Version column will be owned by the table which has shared-table-sequence as 2.

           

          Hope this helps.

          • 2. Re: shared tables in atg
            986851

            Hi, thnx for reply and I must say it's very useful but one thing I want to ask here is you mentioned "shared-table-sequence". what is that?

             

            we normally use sequence If we are using list type in our xml definition, can you please elaborate it little more?

             

            Thanks,

            • 3. Re: shared tables in atg
              ItachiUnited

              Hi,

               

              shared-table-sequence is specifically used for version repositories between tables which share a relationship. It tells the relationship between 2 tables. By default, if it is a simple one to one or one to many, even if we don't specify it explicitly, it takes the shared-table-sequence as 1.  In a two sided one to many or many to many relationship, like the example above, it is used to determine the tables that corresponds to the asset_version(shared-table-sequence=1) and sec_asset_version(shared-table-sequence=2) columns.

               

              The sequence number (seq_nbr) which we normally use for a list is different. This is present in all multi table for making one to many relationships possible. This will part of the multi table's composite key.