Re: Garbage Collection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 5, 2009 at 11:10 AM, Eric Butera <eric.butera@xxxxxxxxx> wrote:

> On Thu, Feb 5, 2009 at 11:06 AM, tedd <tedd@xxxxxxxxxxxx> wrote:
> > Hi gang:
> >
> > A related question to my last "Clarity needed" post.
> >
> > I have a tutor table (showing all the tutors), a course table (showing
> all
> > the courses), and a course-to-tutor table (showing all the instances of
> what
> > tutor teaches what course).
> >
> > Okay, everything works. Whenever I want to find out what courses a
> specific
> > tutor teaches OR what tutors teach a specific course, I simply search the
> > course-to-tutor table and bingo out pops the answer.
> >
> > Now, how do you handle the situation when a tutor quits or when a course
> is
> > no longer offered?
> >
> > If I search the course-to-tutor table for all the tutors who teach a
> course
> > and find a tutor who is no longer there OR search the course-to-tutor
> table
> > for all the courses a tutor teaches and find a course that is no longer
> > offered, how do you handle the record?
> >
> > I realize that if either search turns up nothing, I can check for that
> > situation and then handle it accordingly. But my question is more
> > specifically, in the event of a tutor quilting OR removing a course from
> the
> > curriculum, what do you do about the course-to-tutor orphaned record?
> >
> > As I see it, my choices are to a) ignore the orphaned record or b) delete
> > the orphaned record. If I ignore the record, then the database grows with
> > orphaned records and searches are slowed. If I delete the orphaned
> record,
> > then the problem is solved, right?
> >
> > I just want to get a consensus of how you people normally handle it. Do
> any
> > of you see in danger in deleting an orphaned record?
> >
> > Cheers,
> >
> > tedd
> >
> > --
> > -------
> > http://sperling.com  http://ancientstones.com  http://earthstones.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> Could add a status flag to the records to indicate if they're active
> or not.  Or you could use InnoDB and have it cascade delete join
> records.  Status is nice though in case they come back or to provide
> an undelete type functionality.
>
> --
> http://www.voom.me | EFnet: #voom
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
this gets my vote

-- 

Bastien

Cat, the other other white meat

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux