Reputation: 31
If I have a Parent and Child table , each time I modify that entry from Front End I delete the data in the child table and inserts again. I'm doing this for years but wondering now is it a right method or is there any better methods ? .
Upvotes: 3
Views: 220
Reputation: 11
As Far as my knowledge deleting parent and child records is not a good practice, you can use either on of follow
Option 1
Transfer Old Record to another table which has same structure of original table
Option 2
Add a bit columns (eg: Inactive default value “FALSE”) to both child and parent tables before insert new record, update old record as Inactive, but if you are going to use this method there will be modification in your program logic
Hope this will helps for you....
Upvotes: 1