Arthur Fuller wrote:

Create a new table called Roles, which contains rows for Actor, Director,
Producer, D.O.P. and whatever else is of interest.

For what its worth, I would consider it more appropriate to simply do:

Movies: ID, etc.
People: ID, Name, etc.
MoviePeople: MoviesID, PeopleID, Role

SELECT COUNT(*) FROM Movies
LEFT JOIN MoviePeople ON Movies.ID = MovieID
LEFT JOIN People ON PeopleID = People.ID
WHERE People.Name = "Clint Eastwood"
AND MoviePeople.Role = "Writer";

... to check if Clint Eastwood is a writer or not; although it limits you to the movies you know about, but in a situation like IMDB.com, that's pretty much everything.

PS, I'd actually make Role an ID to a Roles table, but that would've added a JOIN to the query above and unnecessarily complicated my comment. Good suggestion though!

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



---------------------------------------------------------------------
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