I have the following tables
Version
--------
VersionID
VersionName
VersionGeography
-----------------
VersionGeographyID
VersionID (FK)
GeographyID (FK)
PricingDrugVersion
-------------------
PricingDrugID
VersionID (FK)
PricingDrugName
PricingDrugGroup
------------------
PricingDrugGroupID
PricingDrugID (FK)
VersionGeographyID (FK)
StartingPrice
Now when I tried to delete a version I get a DELETE statement conflicted with the reference constraint FK_VersionGeographyVersionID_VersionVersionID the conflict occured in table VersionGeography column versionID.
Is this because it might be a circular reference?
Do I need to remove the foreign key reference from the VersionGeography table and use a trigger?
Version
--------
VersionID
VersionName
VersionGeography
-----------------
VersionGeographyID
VersionID (FK)
GeographyID (FK)
PricingDrugVersion
-------------------
PricingDrugID
VersionID (FK)
PricingDrugName
PricingDrugGroup
------------------
PricingDrugGroupID
PricingDrugID (FK)
VersionGeographyID (FK)
StartingPrice
Now when I tried to delete a version I get a DELETE statement conflicted with the reference constraint FK_VersionGeographyVersionID_VersionVersionID the conflict occured in table VersionGeography column versionID.
Is this because it might be a circular reference?
Do I need to remove the foreign key reference from the VersionGeography table and use a trigger?