Lynn Thames
asked on
What is the best SQL server practice for editing a document that affects multiple tables/rows?
Hi,
I have an application in VB6 that is being migrated from dBAse IV to SQL Server 2008 R2 database. There are several 'documents' that are organized into a header table and detail table where the detail table has multiple records.
When the 'document' is edited, some of the rows from the detail could have been deleted, some added, or some just changed.
What is the best practice for doing this type of work?
1 - update each record based on the record's unique key and then delete any record that isn't in the document anymore?
2 - delete all records and re-insert only the rows in the document?
Thanks for your input!
I have an application in VB6 that is being migrated from dBAse IV to SQL Server 2008 R2 database. There are several 'documents' that are organized into a header table and detail table where the detail table has multiple records.
When the 'document' is edited, some of the rows from the detail could have been deleted, some added, or some just changed.
What is the best practice for doing this type of work?
1 - update each record based on the record's unique key and then delete any record that isn't in the document anymore?
2 - delete all records and re-insert only the rows in the document?
Thanks for your input!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.