Jackson K T
Jackson K T

Reputation: 31

Updating parent and Child Tables

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

Answers (1)

vEKu
vEKu

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

Related Questions