TABLA A1 TABLA A2
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| DESCRIPTION |STYLE | SEATS | | DESCRIPTION |STYLE | SEATS | V-DATE |E-DATE
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| I10 |Sedan | 5 | | I10 |Sedan | 5 |1/1/2020|
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| I30 |Sedan | 5 | | I30 |Sedan | 5 |1/1/2020| +-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| Sorento |SUV | 6 | | Sorento |SUV | 6 |1/1/2020| +-------------+-------+-------+ +-------------+-------+-------+--------+-----+
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| DESCRIPTION |STYLE | SEATS | | DESCRIPTION |STYLE | SEATS | V-DATE |E-DATE
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| I10 |Sedan | 5 | | I10 |Sedan | 5 |1/1/2020|
+-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| I30 |Sedan | 5 | | I30 |Sedan | 5 |1/1/2020| +-------------+-------+-------+ +-------------+-------+-------+--------+-----+
| Sorento |SUV | 6 | | Sorento |SUV | 6 |1/1/2020| +-------------+-------+-------+ +-------------+-------+-------+--------+-----+
Si se da un cambio (update, insert o delete) de algún campo de la Tabla A1 se debe guardar nuevamente todo el contenido de la Tabla A1 en la Tabla A2 diferenciandolo por un ID, pero manteniendo el historial de la data insertada anteriormente en A2.
TABLA A1
+-------------+-------+-------+
| DESCRIPTION |STYLE | SEATS |
+-------------+-------+-------+
| I10 |Sedan | 5 |
+-------------+-------+-------+
| I30 |Sedan | 5 |
+-------------+-------+-------+
| Sorento |SUV | 7 |
+-------------+-------+-------+
+-------------+-------+-------+
| DESCRIPTION |STYLE | SEATS |
+-------------+-------+-------+
| I10 |Sedan | 5 |
+-------------+-------+-------+
| I30 |Sedan | 5 |
+-------------+-------+-------+
| Sorento |SUV | 7 |
+-------------+-------+-------+
TABLA A2
+-------+-------+-----+-------+--------+-----+
| DESCR |STYLE | SEATS| V-DATE|E-DATE | ID |
+-------+-------+-----+-------+--------+-----+
| I10 |Sedan | 5 |1/1/20 | | 1 |
+-------+-------+-----+-------+--------+-----+
| I30 |Sedan | 5 |1/1/20 | | 1 |
+-------+-------+-----+-------+--------+-----+
|Sorento|SUV | 6 |1/1/20 |31/1/20| 1 |
+-------+-------+-----+-------+--------+-----+
+-------+-------+-----+-------+--------+-----+
| I10 |Sedan | 5 |1/1/20 | | 2 |
+-------+-------+-----+-------+--------+-----+
| I30 |Sedan | 5 |1/1/20 | | 2 |
+-------+-------+-----+-------+--------+-----+
|Sorento|SUV | 7 |31/1/20| | 2 |
+-------+-------+-----+-------+--------+-----+
+-------+-------+-----+-------+--------+-----+
| DESCR |STYLE | SEATS| V-DATE|E-DATE | ID |
+-------+-------+-----+-------+--------+-----+
| I10 |Sedan | 5 |1/1/20 | | 1 |
+-------+-------+-----+-------+--------+-----+
| I30 |Sedan | 5 |1/1/20 | | 1 |
+-------+-------+-----+-------+--------+-----+
|Sorento|SUV | 6 |1/1/20 |31/1/20| 1 |
+-------+-------+-----+-------+--------+-----+
+-------+-------+-----+-------+--------+-----+
| I10 |Sedan | 5 |1/1/20 | | 2 |
+-------+-------+-----+-------+--------+-----+
| I30 |Sedan | 5 |1/1/20 | | 2 |
+-------+-------+-----+-------+--------+-----+
|Sorento|SUV | 7 |31/1/20| | 2 |
+-------+-------+-----+-------+--------+-----+
Gracias
Saludos,