On 30/06/2011, at 12:35 AM, Ian Hardingham wrote: > I have an existing table, the matchTable, where each entry holds a lot > of information about a "match". > > I am adding a tournament system, and each match will either be in a > tournament or not in a tournament. > > Should I add a "tournamentID" column to matchTable?
No, at least ideally not, since a large number of the values will be null, which is not a proper normalised design. > Or should I create a new "tournamentMembershipTable" which holds a simple > relationship between matchid and tournament id? Yes. Something like: create table tournamentMembershipTable ( matchID integer primary key not null references matchTable (id) on delete cascade , tournamentID integer not null references tournament (id) on delete cascade ) Thanks, Tom BareFeetWare -- Comparison of SQLite GUI tools: http://www.barefeetware.com/sqlite/compare/?ml -- iPhone/iPad/iPod and Mac software development, specialising in databases develo...@barefeetware.com _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users