I have a question about mongo data storage.
for example:
I have the following business scenarios.
mongo database will save data every other period of time.
save data for the first time
{name:jack,score:70},{name:mary, score:80}
save data for the second time
{name:jack,score:75},{name:Cindy, score:79}
save data for the third time
{name:jack,score:80},{name:Daly, score:69}
when the fourth data arrives,Jack's data still exists,then save the fourth (latest) data and delete the earliest piece of data about Jack.another way to express,I want to keep up to three pieces of information for the same person's data.
Do you have a good solution without cycling the whole table data