Re: Cascade Delete On a Self referncing Table.
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 08/12/04
- Next message: clintonG: "Re: news from the trenches"
- Previous message: Nitin Rana: "Re: How to discover the caller's IP address?"
- In reply to: .NetHelpWanted: "Re: Cascade Delete On a Self referncing Table."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 12 Aug 2004 10:42:33 -0700
>> I written a function which returns me the child nodes and with cursor
I delete the data from related tables. <<
Cursors? Don't you like using SQL? This is not a fix; it is a kludge
that will slow down and (unless you are very good about writing the
constraints) eventually fail as the volume grows.
I am willing to bet a virtual beer that you have nothing to prevent
cycles in your tree. You did not post DDL, so I do not know for
certain.
Here is the link on Amazon.com for my new book on "Trees & Hierarchies
in SQL"
http://www.amazon.com/exec/obidos/tg/detail/-/1558609202/qid=1080772873/
sr=1-1/ref=sr_1_1/102-7683601-6345721?v=glance&s=books#product-details
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: clintonG: "Re: news from the trenches"
- Previous message: Nitin Rana: "Re: How to discover the caller's IP address?"
- In reply to: .NetHelpWanted: "Re: Cascade Delete On a Self referncing Table."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|