How would you store the total amount of points given to another user

I've come from firebase and my original structure was to store a field on my userData called points. When a user gives another user points, this amount increments by 100.

I would then have a field called pointGivers where I would store the givers user data + how many points they have given in total.

I'm trying not to go back to my noSQL ways so how would you best do this?

Would the most sensible thing be to join users and their point givers via a table. In that table we'll store the givers data and the amount of points given and I'll just query that, or would you more SQL experienced guys also have a totalPoints field stored on each users row.
Was this page helpful?