I’m working on an app - my first Rails - and am looking for some
suggestions on the best way (or good way) to set up my models / DB. In
general there are teams and matches; a team will participate in multiple
matches, and in each match there will be 6 teams - 3 vs. 3.
I’m going to want to be able, for a particular team, pull up all matches
for that team, to display a scoring summary, etc. I was thinking of two
tables Team and Match. The team table would have their number and name,
and other info, and the Match table would have the match number, 6
fields for the teams involved, a field for the score for the winners and
one for the losers, and a general comment field.
A tricky bit is I want to be able to have a Match entry page, where the
user would enter the teams numbers, the final scores and the comments,
and upon saving, having the appropriate updates so I can do a lookup by
team to see their matches played.
Any hints? If more info is needed, I’ll be happy to provide.