|
Posted by Jerry Gitomer on August 6, 2006, 6:08 pm
Please log in for more thread options On Sun, 06 Aug 2006 14:45:13 -0700, ryan wrote:
> Maybe i didnt state my question clear enough. This is a hypothetical
> situation, but what if i had thousands of users? Would i be forced to
> store the user IDs of each person who owns that DVD in each DVD row?
> This doesnt seem practical to me. I want the DVD table to act as a
> library with length, year, etc, and i dont want users to be included in
> it.
Ah!
What you need is a third table. The table will consist of one row for
each DVD owned by each user. Each row will contain two columns, the first
being the primary key from the user table and the second being the primary
key from the DVD table. So if user a has 10 DVDs there will be 10 rows
for user x in this table.
You can wind up with a lot of rows in this table, but each row doesn't
take up very much space and, these days, disk space is very inexpensive.
HTH
Jerry
|