Randy,

> I think I've firmed my "theoritical" understanding of relationships enough
> to be dangerous.  Now for the logical part....how do you actually define a
> relationship in mysql?  For instance...
>

http://www.mysql.com/doc/en/SEC447.html

>  table movies
>  columns (movie id(pk) , movie title , year filmed)
>
>  table directors
>  columns (director id(pk), movie id(fk), total movies)
>

Using these definitions the total_movies column seems redundant to me.

    select count(*) from movies,directors where
movies.movie_id=directors.movie_id

would yeald the total movies under said director_id.

Ric


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to