• i am using delete. Lets me give an example

    Lets say there are 3 tables

    Table1(a1,b1,c1,d1) a1 is primary key

    Values....

    1,b1,c1,d1

    2,b1,c1,d1

    3,b1,c1,d1

    Table2(a2,a1,c1,d1) a2 is primary key and a1 is foregin key ref.. Table1

    Values....

    1,1,c1,d1

    2,1,c1,d1

    Table3(a3,a1,c3,d3) a3 is primary key and a1 is foregin key ref.. Table1

    Values....

    1,1,c3,d3

    2,1,c3,d3

    3,2,c3,d3

    4,2,c3,d3

    When i archive data with a1=1 then data will be like this...

    Table 1

    2,b1,c1,d1

    3,b1,c1,d1

    Table2(a2,a1,c1,d1) a2 is primary key and a1 is foregin key ref.. Table1

    Values....

    Table3(a3,a1,c3,d3) a3 is primary key and a1 is foregin key ref.. Table1

    Values....

    3,2,c3,d3

    4,2,c3,d3

    Before restoring on time data might still be added...

    Table1

    Value..

    2,b1,c1,d1

    3,b1,c1,d1

    Table2(a2,a1,c1,d1) a2 is primary key and a1 is foregin key ref.. Table1

    Values....

    1,2,c1,d1

    2,2,c1,d1

    3,2,c1,d1

    Table3(a3,a1,c3,d3) a3 is primary key and a1 is foregin key ref.. Table1

    Values....

    3,2,c3,d3

    4,2,c3,d3

    In this condition if we restore the archive data since the Table2 has values which are already

    in archive data it gives primary key violation problem.

    What do we do on this condition.