Posts

Showing posts from July, 2008

Foreign key cascade on update dangerous?

In relational databases there's a feature called foreign key cascading. Typically, there's an ID associated with each row, or entry, in a database table. Tables may refer to other tables using a foreign key, which typically refers to the IDs of the rows being linked. There are options to "cascade" on two kinds of operations: delete and update. When a table refers to another table, the table pointing to the other table can be configured to take changes in the ID of the original table and integrate them automatically. This is what happens when ON UPDATE CASCADE is set on a foreign key. When ON DELETE CASCADE is set on a foreign key, deleting rows in the original table will also delete rows that are pointing to that row. So, it's not hard to imagine situations where cascading on delete would be dangerous. Now a while ago, I was talking to a database specialist about cascading updates on foreign keys. He mentioned that they're dangerous, so I took his word for it

Truth never changes — or, why we're solving the same problems

"Truth does not change. What was true 2,000 years ago is true today, and will be true 2,000 years from now. New truths may be discovered, but that just means that it was true all along." The above is paraphrased from a sermon given by Pastor Rick Warren at Saddleback Church. Very few things are really new, which is consistent with my observation of what's going on in the world, and if they are, chances are that there's some catch. What's new and doesn't last probably doesn't work or just isn't true. Such things lack conceptual integrity and fall apart eventually when reality hits. (I've just started a new job at JibJab , on which I'll write more about later on, but that doesn't mean my mind is completely devoid of all thought dedicated to solving larger problems.) When I see some new file storage startup, or some new effort to create an operating system, or several companies trying to push their respective next-generation platforms, I think