List:General Discussion« Previous MessageNext Message »
From:Richard Clarke Date:October 20 2002 5:40pm
Subject:Re: how do you define a relationship?
View as plain text  
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

Thread
how do you define a relationship?Randy Hammons20 Oct
  • Re: how do you define a relationship?Richard Clarke20 Oct
  • RE: how do you define a relationship?bwarehouse21 Oct
    • RE: how do you define a relationship?Arthur Fuller21 Oct
      • Re: how do you define a relationship?Michael T. Babcock21 Oct
RE: how do you define a relationship?Jan Steinman21 Oct
Re: how do you define a relationship?Michael T. Babcock21 Oct
RE: how do you define a relationship?Hammons Randy G SSgt 612 ACOMS/SCXX22 Oct
  • Re: how do you define a relationship?Peter Brawley22 Oct
  • RE: how do you define a relationship?Arthur Fuller23 Oct
    • re: RE: how do you define a relationship?Egor Egorov24 Oct
  • Re: how do you define a relationship?Michael T. Babcock8 Nov