Question: You may not end up working as a full database administrator of a MongoDB system, but even as a developer tasked with troubleshooting performance and
You may not end up working as a full database administrator of a MongoDB system, but even as a developer tasked with troubleshooting performance and capacity issues, you will benefit from knowing which queries are running and whether a query is optimized. You may also find that certain operational features of MongoDB can provide performance and capacity solutions for certain data set situations.
For this assignment, you will begin with loading a database of email documents. You will then use MongoDB administration commands to view database and collection stats to become aware of your operational footprint. Additionally, you will set up and use the full-text search optimization feature of MongoDB.
Reminder
To complete the tasks in this assignment, make sure you do the following in your Codio terminal:
../startMongod.sh #first step will always be to start mongo cd datasets/ #change into the directory with the datasets mongoimport --db emails --collection enron ./enron.json #mongo import utility
Prompt: After completing the textbook reading assigned for this module, complete the following tasks using the MongoDB shell in Codio:
Using the mongoimport tool, load the database emails with documents found in the enron.json file into the enron collection. Verify your load by
issuing the following query: db.enron.findOne({"sender" : "rosalee.fleming@enron.com"})
Provide screenshots of the results as evidence.
Answer the following questions using MongoDB queries:
a. What size is the document from Step 1? b. What size is the enron collection? c. What size is the emails database?
Create a full-text index on the text key for the enron collection. Verify your index creation by providing screenshots of the list of indexes.
What is the percentage of emails containing the string Kenneth Lay in the enron collection? Show your query as well as the answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
