[ic] how to implement for an item that belongs to multiple categories?

Sim Zacks Szacks@co.wayne.mi.us
Fri, 03 Nov 2000 10:08:28 -0500

The best way to implement this is usign 3 tables
Movie Table
Actor Table
MovieActor Table
In your movie table you have information that is relevant to your movie (Title, year produced etc..) 
In your actor table you have a row for each actor
In both of those table you need a unique ID for each row (called a primary key)
In Your MovieActor table you would put have a separate row for each actor in each movie

looks like this 
Movie Table 
ID  Title       
1 Star Wars
Actor Table
ID Actor
1 Luke SkyWalker
2 Hans Solo
3 Princess Leah
MovieActor Table
ID MovieID ActorID
1    1             1
2    1             2
3    1             3

This way you can have the same actors in multiple movies without having to retype actor information.
standard database design.

>>> webman4@hotmail.com 11/03/00 10:05AM >>>
Does someone have better way to implement the following scenario?
For a database of movie titles, I currently have multiple fields for the 
actors.  That is, actor1, actor2, actor3, ..., actor10.
I want to search on each actor also.
This way limits to have only upto 10 actors per movie title.
I could add more fields, but it seems like there is a better way to handle 

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 

Interchange-users mailing list