DB Architecture : Linking to intersection or to main tables?

Posted by Jean-Nicolas on Stack Overflow See other posts from Stack Overflow or by Jean-Nicolas
Published on 2009-12-02T15:39:49Z Indexed on 2010/06/12 17:02 UTC
Read the original article Hit count: 196

Hi,

I'm creating fantasy football system on my website but i'm very confuse about how I should link some of my table.

Tables

The main table is Pool which have all the info about the ruling of the fantasy draft.

A standard table User, which contains the usual stuff.

Intersection table called pools_users which contains id,pool_id,user_id because a user could be in more than one pool, and a pool contains more than 1 user.

The problem

Table Selections => that's the table that is causing problem. That's the selection that the user choose for his pool. This is related to the Player table but thats not relevant for this problem.

Should I link this table to the table Pools_users or should I link it with both main table Pool and User. This table contains id,pool_id,user_id,player_id,...

What is the best way link my tables? When I want to retrieve my data, I normally want the information to be divided BY users. "This user have those selections, this one those selections, etc).

© Stack Overflow or respective owner

Related posts about database

Related posts about architecture