I want to be able to store, retrieve, and update individual rounds. Many users will be able to start rounds, then take some action in the physical world, and record their results in the app. So I need to be able to:
A) find, display, and update properties of a user’s most recent round (to record results)
B) find and display all the rounds from a particular user (to show history)
I’ve never worked with an object-oriented DB structure before, so I’m basically thinking of each item under the “round” object (0,1,2,…) as a row in a relational DB table. I’m not sure if this approach is optimal, so I’m def. open to any other feedback if there’s a better way to accomplish this.
I thought of storing the entry of the numbered list (0,1,2,…) in an app variable when each round is created, but I can’t figure out how to get that value. I could query for the last item in the list, but that’s prone to failure if two users create rounds at the same time.