Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have those instuctions: Load the database by executing the following at the Linux command line in the terminal you opened: cd / usr /

I have those instuctions: Load the database by executing the following at the Linux command line in the terminal you opened:
cd /usr/local/datasets
mongoimport --username="${MONGO_USER}"\
--password="${MONGO_PASS}"--port=${MONGO_PORT}\
--host=${MONGO_HOST}--db enron --collection emails \
--authenticationDatabase admin --drop ./enron.json
Note: You must type in the previous commands because cutting and pasting will generate an incorrect character for quotation marks. The MongoDB instance set up in your Apporto virtual lab has an administrative user configured, and the four environment variables MONGO_USER, MONGO_PASS, MONGO_PORT, and MONGO_HOST are pre-configured in your environment. Each of these must be added to the mongoimport =command because the database is not running on the same machine that is running your virtual lab. The --drop option allows you to run the command several times without worrying about duplicate information being loaded into the database.
Retrieve a document from the collection by executing the following commands in the mongo shell. Take a screenshot to verify your execution of these commands.
show dbs #lists directory of databases
use enron #this sets db to the enron database
show collections #lists directory of collections
db.emails.findOne() #retrieves a document from the emails collection
Execute the command to find the size of a single document of your choosing from the enron database. Refer to Two Ways to Get a Document's Size in MongoDB or the textbook if you need help constructing this command. Take a screenshot to verify your execution of this command.
Note: For this command to work, you may need to activate compatibility with legacy versions of the mongo shell. You accomplish this by entering the following at the shell prompt:
snippet install mongocompat
Answer yes to the two questions the shell asks, and you should be all set.
Execute the command to find the size of the collection of documents in the enron database. Refer back to the Two Ways to Get a Documents Size in MongoDB article if you need help constructing this command. Take a screenshot to verify your execution of this command.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

Students also viewed these Databases questions

Question

apply research strategies to writing.

Answered: 1 week ago

Question

=+1 Why are local employment laws important to IHRM?

Answered: 1 week ago

Question

=+ Are some laws more important than others? If so, which ones?

Answered: 1 week ago