Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (50.2k points)

I am having a large CSV file containing a list of stores, in which one of the fields is ZipCode. I have a separate MongoDB database called ZipCodes, which stores the latitude and longitude for any given zip code.

For each insert, I need to look up the latitude and longitude for that store and save that as well.

I am not too familiar with the concept of Map/Reduce, but would that be applicable here? 

Thank you!

1 Answer

0 votes
by (108k points)
edited by

The most familiar thing to be considered as an equivalent of the stored procedure in MongoDB is the 'stored javascript'. As far as I know that in the implementation of MongoDB, stored javascript is the most resembling thing to stored procedures. The Stored JS in MongoDB is collected in the specific system.js collection. The records in the stored js should be structured as follows:

MongoDB is an important part of full-stack development. Enroll in this Full Stack Developer Training to start your journey in this field.

{_id: "addition",

 value: functionName(x, y, z) { return x + y + z; }}

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Mar 15, 2020 in Web Technology by ashely (50.2k points)
0 votes
1 answer
0 votes
1 answer
asked Mar 15, 2020 in Web Technology by ashely (50.2k points)

Browse Categories

...