BackgroundWe are designing data deploy solution. Using TeamSite & Open Deploy. Our DCT has replicant field (just one) . For implementing data deploy we will have parent database table (which will store non-replicant field value) and child table (which will store replicant field values). There should be a relationship between parent & child table. Generally we make "DCR Path" (since it's always unique) as primary key in parent and reference the same in child table.QueryWhat is the best attribute (DCR Path or Unique ID ) to maintain relationship between 2 tables ?Approach 1 (DCR Path) If we go with DCR Path, then we know beforehand the value of DCR path. In data deploy config file but parent & child table columns can refer to same value (using hidden field in DCT). This is simple, but making DCR Path as primary key in parent table is not good approach (performance issue while querying record on VARCHAR instead of NUMBER)Approach 2 (Database Sequence)Create a sequence in database. While saving DCR read this database sequence and update a hidden field in DCR with this information. During data deploy read this value and update the parent & child table accordingly. This will require a database interaction code to be written for DCT (extra overhead)Approach 3 (Unique Number Generator) Generate a unique number (say Current Time stamp string) onSave of DCR. Save this value in DCR hidden field. Use this number as primary key in parent table and in the child table. In this approach there is no overhead of writing database code on DCT side. But the unique number that will be generated is not sequential.Is there any other approach to solve this problem ? I donot want to make DCR Path as primary key in parent table. My preference is to generate unique numbers which are sequential but at the same time I donot want to make database call from DCT to get the unique sequential number.Please share your data deploy implementaion on similar lines
Thanks everyone for your response. It was valuable.Nipper/Ghoti questions for you:Will it make any difference if i make the Primary Key (Unique Number) as VARCHAR or NUMBER.Does VARCHAR (as a Primary Key) has any impact on performace of database quesry over NUMBER datatype ?If there is no performace impact then I can go with VARCHAR. Please suggest.Rohit