Mysql – Can this duplicate ‘points’ data be prevented

database-designMySQL

I'm building a game in which a User does Activities, in each activity the player passes certain Areas, now after the game the player is awarded points for each area he passed through during an activity.

Therefor I assign a certain amount of points in the activity_area table.

What also happens is that the player can receive a points for a certain area of his at random moments, so points can be given for a certain area of that player without concerning an activity.

I created the user_area table to save the areas that a user owns (these are areas he has passed though during an activity). and the user_area_points table to save the random points received.

What I'm now worried about, is that 'points' are stored in two places, in the activity_area table and the user_area_points table.

Should this be further optimized?

enter image description here

Best Answer

No, there is no problem.

activity_area points are the attribute for the activity.

And the user_area_points points are an attribute to user_area.

i don't see why you put the pints into its own table, it is clearly an attribute to user_area