Multiple "Cascade Delete" rules on 1 table allowed?

C

Cirene

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top