Re: Re: Foreign Keys Question

From: Date: Fri, 12 Dec 2008 01:20:32 +0000
Subject: Re: Re: Foreign Keys Question
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-284516@lists.php.net to get a copy of this message
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 having to put the structure in your code all over the place. Col
Why would you want to delete the instructors when deleting the student?
I think he meant the link between the student & instructor (in the student_instructor table), not the instructor itself. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#284516) next »