RE: [PHP] Re: Foreign Keys Question

2008-12-12 Thread Boyd, Todd M.
-Original Message- From: clive [mailto:clive_li...@immigrationunit.com] Sent: Friday, December 12, 2008 1:07 AM To: PHP LIST Subject: Re: [PHP] Re: Foreign Keys Question Colin Guthrie wrote: 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my Foreign Keys

Re: [PHP] Re: Foreign Keys Question

2008-12-12 Thread phphelp -- kbk
In my enrollment database, we keep historical information. My client is a big computer training organization (for which I also teach). The enrollment information is quite fluid -- people are always canceling or rescheduling. It is important for us to know a person's history. $.02 Ken On

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Micah Gersten
Colin Guthrie wrote: The ON DELETE CASCADE option is key here... DELETE FROM students where student_id=1 will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without having to put the

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Chris
Micah Gersten wrote: Colin Guthrie wrote: The ON DELETE CASCADE option is key here... DELETE FROM students where student_id=1 will remove all traces of that student from the db... all the course they've attended, all the instructors who have taught them etc. keeps things nice and tidy without

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread clive
Colin Guthrie wrote: 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my Foreign Keys Question, I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not provide any significant service beyond that. Well that's

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread Robert Cummings
On Fri, 2008-12-12 at 09:06 +0200, clive wrote: Colin Guthrie wrote: 'Twas brillig, and tedd at 11/12/08 18:46 did gyre and gimble: As for my Foreign Keys Question, I think the answer is that it enforces rules upon the configuration (i.e., deleting, altering, and such), but does not

Re: [PHP] Re: Foreign Keys Question

2008-12-11 Thread clive
Robert Cummings wrote: It depends on the data. Certainly for student enrolments I would want a paper trail (so to speak) and would just set a status field. But if it was say, an online shopping cart or cached data... I'd just purge it. Cheers, Rob. yes - you are right, I was just thinking