Re: Foreign Keys Question

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

 



At 12:29 PM -0600 12/11/08, phphelp -- kbk wrote:
Hey tedd ---

Do I understand your structure correctly that you have something like:

Courses (table)
course_id,
subject_id,
student1_id,
student2_id,
student3_id,
student4_id,
<etc.>

Is that right?

Ken

Ken:

That was right, but I think I've reconsidered.

You see, Richard pointed out the error of my ways, namely:

Student table has student data and ID -- as may records as there are students.

Instructor table has instructor data and ID -- as may records as there are instructors.

Course table has course data, ID and Instructor ID and Student ID -- but the number of records vary.

While there will be only one record per Instructor and one pre Student, the Course table can have up to four records for each course depending upon actuall attendance.

I think that makes more sense.

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.

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


[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