Multi-Table Relationships

Now that you understand relational databases, let’s look at the directors problem again. You will recall that the initial solution was to add the directors directly into the movie table, but that was not a viable solution because it would not allow for multiple directors in a single movie.

Actually, an even bigger problem exists with the suggested solution. As I said earlier, relational database design dictates that data never be repeated. If the director’s name was listed with the movie, any director who directed more than one movie would be listed more than once.

Unlike expenses—which are always associated with a single movie—directors can be associated with multiple movies, and movies can be associated with multiple ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.