Hello,I have 3 tables: Posts, Tags and PostsTags.- When a Post is deleted I need to: Delete all PostsTags related to it. No record in Tags should be deleted.- When a Tag is deleted Delete all PostsTags related to it. No record in Posts should be deleted.I am using Cascade Delete for this. My tables are:create table Tags( ID uniqueidentifier not null rowguidcol constraint PK_Tag primary key clustered, [Name] nvarchar(40) not null) -- Tagscreate table Posts( ID uniqueidentifier not null rowguidcol constraint PK_Post primary key clustered, Body nvarchar(max) not null, Created datetime not null, Excerpt nvarchar(max) not null, [File] varbinary(max) filestream default(0x), IPaper bit not null default 0, Published bit not null default 0, Title nvarchar(200) not null, Updated datetime not null) -- Posts create table PostsTags ( PostID uniqueidentifier not null, TagID uniqueidentifier not null, constraint PK_PostsTags primary key clustered (PostID, TagID), constraint FK_PostsTags_Posts foreign key(PostID) references Posts(ID) on delete cascade, constraint FK_PostsTags_Tags foreign key(TagID) references Tags(ID) on delete cascade ) -- PostsTags
Is this the correct way to implement Delete Cascade for the situation I described?Thank You,Miguel