How-to store multiple values in one DB column?
Posted on 2007-10-14
Hi! Currently I'm developing simple db catalog application for dvd store in C# using DataSets. I have stumbled upon the following problem. imagine i have two tables in dataset:
MOVIES with columns - id, name, actorId
ACTORS with columns - id, name
Currently i have set ACTORS.id as a parent in relationship with MOVIES.actorId (child). however this way i am able only to specify one actor per movie which is bad since movie usually have more than one actor acting. also note that number of actors per movie is dynamic - it can be 2, 5 or 20 and it would be dumb to create 20 or 50 actor columns in MOVIES table.. so how do i solve this problem?