NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database Relation Question

Matthew Zimmerman mz34 at nyu.edu
Fri Jan 9 10:23:52 EST 2004


Is it considered good database design to have two tables related to 
each other through more than one field.

What I means is I have two tables. One is called "movies" and one is 
called "people".

Movies has some fields like "director, producer, cinematographer".  
People is just a list of people "first_name, last_name, etc."

Is it ok for movies to relate to people via "director" and "producer" 
and "cinematographer" or is it better to create a "producer" table to 
related to producer, "director" table to relate to director, etc.

I have a feeling I am doing it the right way just having a "people" 
table but I wasn't sure if this would cause any query problems down the 
line.

Thanks for your help. I am not sure if I used all of the proper 
terminology here so I can rephrase the question if needed.

Matt




More information about the talk mailing list