I have two csv files file1.csv and file2.csv I load those files in
two tables in a database 'table1' and 'table2'. table1 contains
two columns, those columns use table2 columns to calculate their
values, and after that the row of table2 can be deleted because it
used just to update table1.
My question is:
Which solution is better:
- When insert in table2 executes a trigger that update the two columns in table1 then delete current row from table2 because it used just to calculate the two columns of table1.
- Delete table2 and do just update table1 when loading file2.
- Create the two columns as calculated columns, so they will be virtual columns only.
- Create view composed of all columns of table1 and add two calculated columns in this view. You can propose another solution