Hello! My name is Calvin Mondele, I am wondering because I am studying the Mongodb Basics, but I have a question on lab 1.5. Scavenger Hunt 1. The question asking: How many movies in the video collection were directed by Patty Jenkins. Stated more precisely, how many documents in the video.movies collection have a value of “Patty Jenkins” for the director field? But from the documents, there is no where “Patty Jenkins” was director or anyone. also there is no place to answer no or # 0 as an answer. So what can I do in this case?
What happens is that you are in the wrong cluster. Check what are the databases you have and, in video database review the collections you have.
If you noticed in the course, we constantly switched between the mongo database:
mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/100YWeatherSmall?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
For me the second is:
mongo "mongodb://cluster0-shard-00-00-bbv0r.mongodb.net:27017,cluster0-shard-00-01-bbv0r.mongodb.net:27017,cluster0-shard-00-02-bbv0r.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --ssl --authenticationDatabase admin --username m001-student --password m001-mongodb-basics
Following up the great reply from admnll, you just need to switch to video database and movies collection.
To switch to another database from mongo shell:
> use video
Use the above command
use or you can use Compass to view the data.
I earlier asked a question about the word “quality” as it was referred to in Chapter One regarding the values for fields. I don’t think I had an answer to that question. If I did, could you point me to it?