I would split your Matchup
table into two: Matchup
proper and MatchupDetails
.
The Matchup
table would have a MatchupID
column as its primary key.
The MatchupDetails
one would consist of at least two columns: MatchupID
to reference the Matchup
table and TeamID
to reference the Team
table (you do have one, don't you?). The two columns would form the table's composite primary key.
Finally, there would be this Pick
table. Since you've got multiple users (as per one of your comments), there would need to be a UserID
reference. Two more columns, MatchupID
& TeamID
would serve as a composite foreign key referencing the corresponding column set in MatchupDetails
. And to ensure that one user can pick no more than one team from a match-up, a composite primary key of (UserID, MatchupID)
should do.
To summarise, here's a complete outline of the relevant part of the schema:
Matchup
:
MatchupID
PRIMARY KEY (MatchupID)
MatchupDetails
:
MatchupID
TeamID
FOREIGN KEY (MatchupID)
FOREIGN KEY (TeamID)
PRIMARY KEY (MatchupID, TeamID)
Pick
:
UserID
MatchupID
TeamID
FOREIGN KEY (UserID)
FOREIGN KEY (MatchupID, TeamID)
PRIMARY KEY (UserID, MatchupID)