sql server - update cascade in self referencing table - best practice? -


it seems not possible set update cascade on self-referencing table.

as consequence, not possible rename parent node. workaround can see create new entry, , re-link child nodes (and data other tables), , delete old entry.

as rather complicated, there better solution, cannot see in moment?

the simplest (i guess depends on specific case) solution create identity primary key , reference/self reference on instead of name simple field.

that allow rename nodes without affecting dependant nodes, , make less complicated update structure while still maintaining foreign key relationships other tables.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -