/*
// type of structure
n.b. all proprietes are fixed lenght or max fixed lenght, except for number of match, they increase day by day
match (int or string)
date (datetime) fixed
hostcity (string) fixed
home_team (string) fixed
points (int) fixed
player1 (int) fixed
points (int)fixed
player2
points
player3
points
player4
points
player5
points
guest_team
points
player1
points
player2
points
player3
points
player4
points
player5
points
// information to compute
create new objects/structure match for every match in sql table
count all points of a team in all match
count all points of a team when it's home_team
count all points of a team when it's host_team
count how many times playerX is in the match
count how many times playerX is in the match as home_team player
count how many times playerX is in the match as host_team player
count the max series of match where playerX is in the home_team or guest_team
count the max series of match where playerX is not in the home_team or guest_team
count the winned match where playerX1, playerX2 and playerX3 are in home_team or guest_team
compute total sum of points of playerX1, playerX2, playerX3 when they are in the match together
print sort lists of various count/compute
and more...
*/
I'll load all sql datas as structures or in array, and then compute them, sql is so slow for this kind of compute.
I sought for various methods, functions, type-tructure to make this possible but I'm luck of experience to judge what are the best choice for realize it;
please suggest me the right way with example if possible.