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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -