Tags "cascading-deletes" Result

cascading deletes causing multiple cascade paths

I am using SQlServer 2008, and an extract of some datatables is displayed below: Users Id (PK) UserItems UserId (PK) ItemId (PK) - (Compound key of 2 columns) ... UserItemVotes UserId (PK) ItemId (PK) VoterId (PK) - (Compound key of 3 columns) I have the following relationships defined: User.Id -> UserItems.UserId (UserItems.UserId, UserIt

it1352 0 2019-05-15

django soft delete doesn't cascade delete

I'm using a soft delete in my django admin, done like this. The issue is that when I delete a foreign key item, that it doesn't seem to trigger the deletes for all the items it's linked to. Or maybe it does but it's not running the custom def delete I have on my model. -If I delete a person then they are soft-deleted, but the related account is l

it1352 23 2019-05-15

db2 vs oracle

No flame wars, please! We''re planning a move from a non-relational system to a relational system. Our choices have been narrowed to Oracle and DB2. Since we''re moving from non-relational to relational, then we''re not currently using any relational-type operators. So I expect the end result to use simple, SQL standard commands and queries. The

it1352 1 2019-06-25

Cascading Soft Delete

SQL has always had a great feature: cascading deletes. You plan it in advance and when it's time to delete something, BAM! No need to worry about all those dependent records. However, nowadays it's almost taboo to actually DELETE anything. You flag it as deleted and stop showing it. Unfortunately, I haven't been able to find a solid solution to do

it1352 0 2020-07-07

Figure out if a table has a DELETE on CASCADE

Can I know if a database have DELETE ON CASCADE with a query? Solution Yes. Just query the INFORMATION_SCHEMA SELECT * FROM information_schema.REFERENTIAL_CONSTRAINTS Or more specifically -- This query will list all constraints, their delete rule, -- the constraint table/column list, and the referenced table SELECT r.CONSTRAINT_NAME, r.D

it1352 0 2019-05-15

Core Data Relationships cause save error after delete

This question is probably a long shot. I can't figure out the errors I'm getting on my core data project when I save after I delete an entity. My .xcdatamodel can be seen at: http://jump.fm/BXRCG I have two main entities that I work with, an Outfit and an Article. I can create them with no problem but when I delete them I get the follow error

it1352 1 2019-05-14

SQLite Delete Cascade not working

In Android 4.2, using SQLite 3.7.11, when I delete a row from the Quizzes table, who's schema is below, the corresponding rows in the QuizQuestions table are not deleted. I can't figure out what's wrong. I have tried putting db.execSQL("PRAGMA foreign_keys = ON;"); before and after the create table statements. Create table statements: CREAT

it1352 9 2019-05-07