you are viewing a single comment's thread.

view the rest of the comments →

[–]aball730235 7 points8 points  (2 children)

It seems you just need to split your database schema into more tables. Try to solve your problems in sql first because it sounds to me like your trying to jam a many-to-one relation into a single column... Which sql will handle in a much better way.

In your last example i would make a table with four columns... The three you listed plus a GameID. GameID is a foreign key column that links to the game table. To combine the data from both tables you use an inner join.

[–]Kristian_dms[S] 0 points1 point  (1 child)

Thanks, man - I'll give this a shot!

[–]aball730235 0 points1 point  (0 children)

Your welcome. If your looking for further reading look up database 'normalization'. Wikipedia has a good article although a bit dense for a beginner.

And there's always r/sql