I'm starting a new project. The task is to basically move data from a file to a database. Let's say there's one data-file per hour and a line of the file transforms into one row of the database.
Technical Details:
My problem is the updating process.
What I'd like to do is:
Solution 1:
original_table
copy_table
to original_table
Solution 2:
original_table
original_table
(shrink, reset index)Questions:
Solution 2 definitely sounds more efficient. Solution 1 sounds needlessly roundabout.
To accomplish steps 4 & 5 from solution 1 or step 3 from solution 2, just use EntityCommand.ExecuteNonQuery
with the appropriate T-SQL text - e.g. TRUNCATE TABLE original_table
.