Explain function to confirm the index will be used

Assignment Help Computer Engineering
Reference no: EM133626520

Overview

In this milestone, you will import the Austin Animal Center (AAC) CSV file that you will be using for Project One into MongoDB. You will then form both a single and a compound index to optimize the queries for the scenario. Remember that you can use the explain function to verify the use of indexes in your queries. Finally, you will create a user account in Mongo to address security needs (your mongodb instance in Apporto already operates with an admin account).

Note: Every time you connect to your Apporto environment, your MongoDB server will automatically start up, usually within about 2 minutes of your login. The MongoDB instance always starts with the authentication enabled.

Be sure to begin working on your milestone early in the week. One natural stopping point would be after finishing Part I.

Prompt

Part I: Importing and Indexing a Data Set
You have been asked to import a file for the Grazioso Salvare project. In order to do so, you must complete the following steps:

You have been asked to import a file for the Grazioso Salvare project. You must perform the following steps to do so:

In Apporto, open the terminal window to access the Linux shell. Upload the Austin Animal Center (AAC) Outcomes data set into MongoDB by importing a CSV file using the appropriate MongoDB import tool. Use the database name "AAC" and collection name "animals." Complete the import using the mongoimport tool, and take screenshots of both the import command and its execution.

Tip: How to import a CSV file is covered in the mongoimport documentation in the Module Three Resources Additional Support section. The command you use should be like the ones used in Module One Assignment and Module Two Assignment. (The requirements and rubric documents contain examples for the mongoimport command, but these use the default JSON datatype; adjust the command to import a CSV file.) You'll find the Austin Animal Center (AAC) Outcomes data set in the /usr/local/datasets/ directory. The file name is "aac_shelter_outcomes.csv".
After importing your data set, open the mongo shell. -Create a simple index on the key "breed." Show an example query using this index, and use the explain function to verify that the index will be used. Take screenshots of your example query.
-Create a compound index that will improve the performance of queries looking for breeds that have an "outcome_type" of "Transfer." Show an example query using this compound index, and use the explain function to confirm the index will be used. Take screenshots of your example query.
Part II: User Authentication
The client has asked you to comply with their security needs and ensure user authentication to the database by setting up both administrator and user accounts. Your administrator account has already been configured on your database in Apporto. So, you will only have to create a user account. To do so, follow the steps below.

-Create a new user account called "aacuser" for the database AAC in the mongo shell. Refer to steps 6-7 of the MongoDB Manual Enable Access Control tutorial for help with this task. You will need to modify the commands so the account name is "aacuser." Additional information with respect to user management may be found in the User Management in MongoDB document.

Note: You will need to create your user in the admin database, even though it will only have a role in the aac database. When you use the mongo shell (mongosh) to connect to the database with your user account, you will need to reset two environment variables to reflect the username and password you just created. (The MongoDB hostname and port will be pulled automatically from your environment variables.)

Tip: To make it easier to log in as your user, open up a second terminal session in your Linux environment. In this session, set the following environment variables:

Once this is complete, you can run mongosh in that window as your new user.

Example:

IMPORTANT: Write down the password for the aacuser account and keep it handy. You will need to use this account later in the course.
Take a screenshot of your login process to MongoDB using the mongo shell. Be sure you can access MongoDB and list the databases using both the admin and aacuser accounts. This task will verify that your accounts are working. You should be able to include the login commands for both accounts in one screenshot, but if you cannot, include two screenshots to show both login commands.

When you have successfully attached to your MongoDB instance with mongosh, use the following command to verify that you have connected as a specific user:
Include the results in your screenshot for each user.

Reference no: EM133626520

Questions Cloud

Advanced respiratory disease whose has inadequate nutrition : The nurse is caring for an older adult homebound client with advanced respiratory disease whose has inadequate nutrition.
What do you use to document your work : teammates run your code, and display your visualizations. What do you use to document your work? 1 point A spreadsheet A data frame An R Markdown notebook
Nutrition and oral hydration : Describe the procedure? What are the indications? What are the outcomes/Evaluation?
Combine data from multiple csv files into a single table : combine data from multiple CSV files into a single table, calculate individual and abnormal stock returns, and compute returns for a portfolio of stocks
Explain function to confirm the index will be used : Example query using this compound index, and use the explain function to confirm the index will be used. Take screenshots of your example query
What argument is used to refer to matching up : data and the plots in their visualization. What argument is used to refer to matching up a specific variable in your dataset with a specific aesthetic
Do you think that intelligence is a single quality : Do you think that intelligence is a single quality or that there are different kinds of intelligence?" Enter your answer in the space provided
Create a media-based format : Create your initial post to include the following items: State your full name and, if applicable, any preferred name (i.e., nickname). State your location
Identify stakeholders who would be relevant to the interview : Identify 3 stakeholders who would be relevant to the interview. Create 3 questions that are pertinent to each of the stakeholders identified above.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd