> Thanks for the explanation, Isaac!

Also just FYI, although referential integrity is desired in most
cases, there are some exceptions in which you may not want to enforce
referential integrity. Typically the only place you would want to
allow orphaned records would be in a logging tool or in a record which
is representative of some sort of log like a blog comment. This allows
you to maintain a log entry for an event, even if the log references a
deleted user. The act of deleting the user doesn't alter history, so
you still want to retain a record of the event.

This may be especially true with blogs and forums - if a user is
deleted, you really don't want to remove all the forum posts they've
made because doing that will fracture the threads and make nonsense of
those conversations. There are of course ways to still maintain
referential integrity in this case, for example by allowing null
values in the userid column and adding a field or fields in the
forum-message table to hold the user's name, although at that point
imo whether or not there's a null or an id value in the userid column
is 6 of 1 or 1/2-doz of the other.

Personally I'm still not sure what I think is the best practice for
handling the transition of a deleted user's name for items like forum
messages -- whether it's smarter to keep the user record and simply
disable it (which forces managers to look at it when they manage
users), to store names each time a message is posted (which could
result in different messages by the same user displaying different
names - which could be good or bad given your opinion about whether or
not their name is part of the "history" of the conversation -- if part
of the conversation references their name (or signature), then
changing it later could also make nonsense out of the thread), or to
update all forum messages with the user's current name information
when the user is deleted.


s. isaac dealey     434.293.6201
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236783
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to