JimmyS
02-16-2007, 07:20 PM
I have a number of tables that are linked together. If a record record is created in the "main" table, atleast one record or more is created in the other tables.
My users have requested a edit function and I was wondering which of the below methods would be best.
1. Delete the main record and all record relating to it in all the other tables. Then creating new records for the tables with the new data.
OR
2. Check if the the data has changed, and if it has either create a new record if one does not already exist or update if it already exists. Or if data did exist and no longer does delete the record.
For simplicity sake the first one was the option I would go with but I am not sure if it would create more headaches in the long run.
My users have requested a edit function and I was wondering which of the below methods would be best.
1. Delete the main record and all record relating to it in all the other tables. Then creating new records for the tables with the new data.
OR
2. Check if the the data has changed, and if it has either create a new record if one does not already exist or update if it already exists. Or if data did exist and no longer does delete the record.
For simplicity sake the first one was the option I would go with but I am not sure if it would create more headaches in the long run.