I have two objects with MTM relationship
User
------------
id
name
Location
------------
id
latitude
longitude
date_created
userlocation
------------
id
fk_user_id
fk_location_id
When accessing the data, I usually just need to know the latest location associated with a user but I do want to store all of user's previous locations. The write to read ratio is about 1:10
I believe this is a pretty common persistence pattern, I wonder what's the most standard way to approach it? Is it to do a JOIN
and form a new View?