Reading: The MongoDB Compass site provides a GUI tool for manipulating JSON documents in a MongoDB database.
There are many quick reference cards and cheat sheets available for MongoDB
online. This one is one of the most comprehensive,
although it doesn't appear to describe all the options available for $expr
queries.
MongoDB is already running on the department's Linux server, lemuria.cis.vermontstate.edu. You will need an account on that server to access Mongo. Download and install MongoDB Compass from the URL above. This is a GUI tool that you can use to connect to the server and manipulate the data stored there.
When you set up a connection to the server, you will need to use an SSH tunnel since MongoDB is not exposed through Lemuria's host-based firewall. If you "favorite" the connection, it will be added to a convenient list on the left side of the Compass's main window.
After connecting to MongoDB, go into the VariableStars database and add yourself to the observers collection. Be sure to include a "name" field with your true name, so I can verify that you did this step. Include several other fields, but you can make up the data in them. See the "Peter Chapin" and "Alice Atlas" samples for ideas. Don't use Compass's GUI interface to do this! Open a Mongo Shell (button in the upper right corner) and issue the necessary JavaScript commands to add your document. Record what command you used.
Modify your document by changing one of the fields. Record the command you used.
In this part use the Mongo Shell to query the stars collection for information about various variable stars.
Find all stars in the constellation Auriga ("Aur") with a minimum brightness of at least 8.0 (that is, brighter than 8.0... so a smaller number). Such stars can be seen in binoculars even when at their minimum. [58 documents]
Find all stars in Taurus ("Tau") and Gemini ("Gem") with maximum brightness that is fainter than 6.0 (larger number) and a minimum brightness that is brighter than 12.0 (smaller number). These stars are too faint to see with the naked eye but might be fun objects for a small, backyard telescope. Hint: be careful with my use of the word 'and' in the phrase "Taurus and Gemini." English uses logical connectives in ambiguous ways. [276 documents]
Find all stars in Ursa Major ("UMa", aka "the Big Dipper") with a magnitude difference
between 0.5 and 1.0 magnitudes. Hint: use the $expr
operator in your query. [136
documents]
Find all stars in a rectangular region of the sky with right ascension between 5 hours and 6 hours and declination between +20 and +30 degrees. [147 documents]
Submit a document containing the commands you used in Mongo Shell to create and edit your observer information and to satisfy the queries listed in Part 2.
Last Revised: 2024-11-14
© Copyright 2024 by Peter Chapin <peter.chapin@vermontstate.edu>