Reply to Re: How to attached many ID's to one title ?

Your name:

Reply:


Posted by J.O. Aho on 08/03/05 17:43

Michael wrote:
> Hi.
>
> I have often wondered how big sites like imdb.com are made.
>
> How do they make a database with all these actors link to a movie.
> When you find a movie it has maybe 50 people attached to this movie. I geuss
> they don't have a database with Movie title, Actor1, Actors2, Actors3....
> Actor49 and Actor50 with and id (connected to there name in another base)
> written in all of them.

You use "one to many" table, where you may have at least two columns

Movie_id, Actor_id

You make the two columns together to be the primary key, this way you won't
have doublets. Then you may have your Movie_id and then join the "one to many"
table with the Actors table and make a search on those who has the Movie_id
same as for the movie you have just looked up.


//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация