Not getting any details after entering in shell

I have tried the command (last line) not able to get any details . Kindly help

Many things

See for why show db failed.

It looks like you find out why your first db.mflix.find failed. Find needs a document, so the {} are required.

As for the last call with pretty, it looks like no document matches the query so pretty has nothing to print.

I have already used {} Please check the second last line. After that i just received the last line. The results are present and displaying in atlas.

Hi @Rajeev_Mohanty_49307,

Based on what I see in the screenshot, I would like to mention couple of things here.

  • Before we use any database, we first need to ensure our db variable is pointing to the right database. You can verify this by simply printing its value.
  • In your last query, the db variable is not pointing to the right database. It was pointing to the movie database which clearly does not exist. In order to make it work, you need to point it to the video database.
use video 
db.movies.find({"mpaaRating":"NOT RATED"}).pretty()

For some of the other queries in the screenshot, there are syntax errors and similar errors that I just mentioned above. For more information on how the find() works, please refer our documentation.

Hope it helps!

If you have any other query, please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer