java - Web Application - Deleting parent also delete direct and indirect dependents -


what approach in handling big hierarchy of parent , children relationship?

let delete parent via web application, deleting parent should delete dependents. issue here due performance , possibility on database lock during processing of mass number of children

how solution of such scenario handled , designed?

the best solution can think of this:

1) create tables schema defines primary-foreign keys.

2) create stored-procedures deal update/delete of data.

3) call these stored-procedures java program. 1 straight call database. handing on control java program database.

4) now, stored-procedure, either delete records manually or delete cascade. delete cascade deletes all child records automatically upon deleting parent record.

5) remember, have implement foreign key on delete cascade command use cascade delete option.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -