Archive of UserLand's first discussion group, started October 5, 1998.

Re: Deleting Account is more than storage cleaning

Author:Jim Roepcke
Posted:6/2/1999; 9:52:52 AM
Topic:Scripting News Bulletins via Email
Msg #:6952 (In response to 6951)
Prev/Next:6951 / 6953

The e-mail address is the primary key for membership records.

In relational database terms, if you delete a record from a database, you usually want to do a cascading delete (deleting record in other tables that refer to the primary key just deleted).

It might be that deleting an account in UserLand's membership database would require they delete all the messages that account wrote. This is just speculation of course, since I don't know the members.root/discuss.root structure very well. (I wish I did)

One rule I learned early in database (schema) design was to never use meaningful information (such as SSN) as a primary or foreign key. This is exactly the situation that that rule tries to help people avoid.

If you applied that rule to members.root, a meaningless number would become the primary key for the record (which is the name of the account table), and the e-mail address would become an attribute of the record.

An index could easily be maintained that allowed easy translation between the meaningless number key and the e-mail address, so that the e-mail address could be used to lookup records.

(This is not a reccommendation, suggestion, or request, just conversation)

Short answer -- it might not be as easy as it sounds to rename or remove a member record.

Jim


There are responses to this message:


This page was archived on 6/13/2001; 4:50:34 PM.

© Copyright 1998-2001 UserLand Software, Inc.