Subject | Circular Foreign Key Dependencies |
---|---|
Author | Jim Starkey |
Post date | 2001-03-23T22:39:09Z |
Circular foreign key dependencies are natural and useful
(contentious statement #1), but a near disaster from a
DDL perspective (contentious statement #2) since a table
can't be dropped with another table referencing it, and
there is no easy to delete an unnamed foreign key
constraint. Anybody have any rare and keen insight into
the problem?
Among the solutions:
1. alter table blah drop foreign key (seg1, seg2)
(is a references clause required? optional?)
2. drop table blah regardless
(leaves dependency tables kinda in limbo)
3. drop tables blah, yuckola, payroll
(get them all at once and who cares?)
4. Outlaw circular dependencies (naw...)
Any ideas?
Jim Starkey
(contentious statement #1), but a near disaster from a
DDL perspective (contentious statement #2) since a table
can't be dropped with another table referencing it, and
there is no easy to delete an unnamed foreign key
constraint. Anybody have any rare and keen insight into
the problem?
Among the solutions:
1. alter table blah drop foreign key (seg1, seg2)
(is a references clause required? optional?)
2. drop table blah regardless
(leaves dependency tables kinda in limbo)
3. drop tables blah, yuckola, payroll
(get them all at once and who cares?)
4. Outlaw circular dependencies (naw...)
Any ideas?
Jim Starkey