473,657 Members | 2,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple "Cascade Delete" rules on 1 table allowed?

Can you assist me with this database problem?

I have 4 tables in my db....
Table1 (key: Table1Id)
Table2 (key: Table2Id)
Table3 (key: Table3Id)

Table 4 has these fields:
key: Table4Id
Table1Id (ties it to Table 1)
Table2Id (ties it to Table 2)
Table3Id (ties it to Table 3)

I created these links using VS2008's Database Diagram.

I would like these 3 FK relationships ALL to be CASCADE DELETE
Table1.Table1Id --Table4.Table1Id
Table2.Table1Id --Table4.Table2Id
Table3.Table1Id --Table4.Table3Id

When I try to save the database diagram I get an error stating...

- Unable to create relationship 'FK_....'.
Introducing FOREIGN KEY constraint 'FK_....' on table 'Table4' may cause
cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE
NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors.

Am I doing something wrong? Is it possible to have multiple CASCADE DELETE
rules on 1 table (Table4 in this case)?

Thanks!
Jun 27 '08 #1
0 1653

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1924
by: Ovid | last post by:
Hi, I've run into a bit of a sticky design issue. We have products in three categories which I will call 'A', 'B' and 'C'. We have "kits" which contain three products, one from each category. Below is some sample SQL to set things up, but I need to ensure that each kit gets three products -- one from each category. Obviously, this basic SQL doesn't allow that. Any suggestions? Do I need a different schema design, or is there...
3
1428
by: bchoi | last post by:
Hi. I am trying to log (Not SQL Transaction log) all deleted rows into a custome log file after performing "cascade delete". I couldn't find any reference for this in SQL manual or News group. Byung Choi
11
3649
by: RWC | last post by:
Hello, I'm having trouble converting code in Access XP / 2002. I have some code that declares an variable "as database" in Access 97, which is not recognized in Access XP. I've tried to find a refrence to the items that have changed between 97 and XP, and haven't been able to find anything yet. I will continue looking, but if anyone can shed some light on this fairly quickly, I would appreciate it. Thanks In Advance!
1
2627
by: shumaker | last post by:
....please. I've found other posts that explain the Cascade options, but the Enforce relationships option still is foggy to me. As to "enforcing relationship for ... UPDATEs"(with cascade NOT checked), then I'm guessing that an update to that key field that would normally cascade will instead produce some sort of constraint violation error?
0
314
by: Felix Finch | last post by:
I have a perl test program which has about 80 test cases, each of which creates its own schema so I can remove them with DROP SCHEMA xxx CASCADE. Normally each test case creates and drops the same schema, but it can run a mode to preserve each schema and all the disk files for each test. I recently changed my cleanup code to run psql with all -c commands on one command line rather than a separate psql -c for each one ... psql -c 'DROP...
0
401
by: Marty Scholes | last post by:
I may have found a bug. I have a table: CREATE TABLE onlpcd_stat ( sel BIGSERIAL PRIMARY KEY, user_id INTEGER NOT NULL REFERENCES onlpcd_user ON DELETE CASCADE, vars TEXT, /* string of Perl var hash */ cre_ts TIMESTAMP DEFAULT NOW()
10
3550
by: Eric E | last post by:
Hi all, I am using an Access client linked to a PG 7.4 server via ODBC. I have a stored proc on the server that inserts rows into a table.particular table, accomplished via an INSERT within the body of the stored proc. The procedure does not explicitly commit this data, as no transactions are invoked. The problem is that Access will not modify these records via table or form view, giving its generic "Write conflict: another user has...
11
723
by: Marcus Otmarsen | last post by:
In my CSS stylesheet I can define e.g. A { FONT-WEIGHT: bold; FONT-SIZE: 16px; } and TD A { FONT-WEIGHT: bold; FONT-SIZE: 12px; } What is the difference for a HTML code like
3
35791
by: tvnaidu | last post by:
I compiled tinyxml files (.cpp files) and when I am linking to create final exe in Linux, I am getting lot of errors saying "undefiend reference" to "operator new" and "delete", any idea?. Main.cpp:377: undefined reference to `operator delete(void*)' tinyXML/include/tinystr.h:259: undefined reference to `operator delete(void*)' ../common/tinyXML/include/tinyxml.h:1401: undefined reference to `operator delete(void*)'...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.