What is the Title.ID and Actor.ID?

Will this work if someone is doing a text search on a webpage? The results will go to another page. Does the below go to the first page or the results page? Thank you.

At 12:20 PM 10/16/2002 -0400, you wrote:
John Chang wrote:


Studios (StudioName, StudioID)
Genres (GenreName, GenreID)
Titles (VideoTitle, Details, StudioID, GenreID, BitRateID, TitleID)
Actors (F_Name, L_Name, ActorID)
Stars (TitleID, ActorID)
TitleGenres (TitleID, GenreID)

So, if I just use theses tables I will be OK if the video has multiple titles, multiple actors, & multiple genres?

How do I create a junction table? Example, between Genres and Titles, how do I add the to PK fields to TitleGenres? Do I just create the TitleGenres table and add the TitleID & GenreID field and does the database know they are linked?
Sort of; assuming you create a junction table called "TitleActors" with TitleID, ActorID, and you want the movies with "Stalone" as the actor them, you might do a query like:

select * from Titles
LEFT JOIN TitleActors ON Title.ID = TitleID
LEFT JOIN Actors ON ActorID = Actors.ID
WHERE Actors.L_Name = "Stalone";

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

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