I have a service who is all the time getting data from different sources. Then, it have to check if this data exists in database and if exists update the data, else if not exist insert the data.
The data in data base may be large (thousands of elements) and in this moment I'm doing one select in each element I got with the service against the data base to check if the element exists. I have a lot of selects all the time and I think this is not the best way to maintain my master data. What do you think? What should be the best strategy to do this?
(I use .Net C# and MongoDB)
Thanks, Dani.