I have two collections. Let's say, I want to search all the names of people in Parent table where place in child table = "Amsterdam". In SQL this would be something like this,
SELECT p.name FROM ParentTable p INNER JOIN ChildTable c ON p._id = c.parent_id WHERE place = "Amsterdam";
Following is the database schema,
Now, I am new to the world of NoSQL databases. How should I structure my MongoDB database to achieve something similar to the above? Should I nest the collections or is there a way to reference the collections like the Foreign Key in SQL.