deleting data from a DB

0 views
Skip to first unread message

Tim Rosenblatt

unread,
Sep 11, 2009, 7:20:32 AM9/11/09
to orug-di...@googlegroups.com
Hey all, I read this article on deleting data from a database, and it seemed worth passing along

http://www.infoq.com/news/2009/09/Do-Not-Delete-Data

We had a discussion on this at standup yesterday, and it was suggested that it might be worth tracking the reason why a record was deleted (like a state machine), as well as a deleted_at timestamp.

Thoughts?


--
Tim Rosenblatt
http://www.timrosenblatt.com

Justin Blake

unread,
Sep 11, 2009, 8:58:35 AM9/11/09
to Orlando Ruby Users Group Discussion
I like what the article says about "giving a correct interpretation of
user’s intention". I don't know if that warrants two fields (i.e.
deleted_at and reason), or just one context-sensitive field (e.g.
canceled_at). I guess in some cases there could be multiple reasons
for "deleting" something, but I think that would be rare.

But having a consistently named field like deleted_at makes it easy
for something like ActiveRecord to handle the exclusions
behind-the-scenes without any per-model config. But at the same time
having a semantic name for your field is... semantic.

That was a very long way to say I don't know.

--
Justin Blake
http://blog.adsdevshop.com/
Reply all
Reply to author
Forward
0 new messages