Hi all
Loving Glide so far - amazingly fast to get started. My issue is that in achieving early objectives, I’m thinking of more and more things to do, and while I think I know how I would need to structure it in a traditional relational databse, I can’t figure out how to do it in Glide. Hence, I’m asking you lovely people for help!
The app is for my son’s and friends’ Rubik’s Cube hobby. I want the to be able to record times for solving different puzzles, and then to calculate stats (such as PBs, various averages - over 5 solves, over 12 solves, over all solves, etc) and leaderboards, by puzzle type (eg 3x3x3 cube, 4x4x4 cube etc).
The recent addition is puzzle type, which I am struggling to figure out how to do in a flexible way that will enable me to add puzzles without huge amounts of work.
I currently have a table for users, and one for solves, which are joined. The users table has a lookup column which holds all of a given user’s solve times, and uses a load of columns to calculate the various stats I want to do, by person. I then combine those in to an array and sort them to find leaderboard positions. All in the User table. But this uses about 15 columns per statistic. And that’s just for a single puzzle type.
I have created a new table for puzzle type, and will log a puzzle type against each solve. But I can’t then work out how to calculate the statistics by puzzle type. If I do it the way I have now, it will be an additional 15 columns per puzzle type per statistic, and that can’t be the best way. In fact, I’m fairly sure that there’s a better way to do what I have already done using clever queries/filters/calculations etc.
I have ideas for other dimensions I’d like to add also, so this is something I really do need to make work before I can take it further!
Any help very greatly appreciated!