Question: Use MongoDB for all questions Initially, MongoDB will use the multikey index for searching documents where the grades array contains the first element (80) in

Use MongoDB for all questions
Use MongoDB for all questions Initially, MongoDB will use the multikey index

Initially, MongoDB will use the multikey index for searching documents where the grades array contains the first element (80) in any position. Then, within those selected documents, the documents with all the matching elements will be selected. V: Exercises 1- Create a new collection "project" in the "company" database with these key fields: (id, name, location, startDate, duration) 2- Insert 10 documents in "Project" collection that generate results for the following queries. 3- Without indexing, analyze the performance of the following query "Find projects with a duration between 1 month and 6 months". Do not forget to use print() to generate your performance analysis. 4- Enable indexing for the duration filed. 5- Repeat question 3 and explain your observation. 6- Find projects that are in these locations ("Toronto", "Ottawa", "Victoria"). 7- Find projects with names starting with "co" oR started at 2020. State the number of the returned results. 8- Analyze the query performance and speed. Do not forget to use print () to generate your performance analysis. 9- Drop the previous index. 10- Create a compound index on keys name and startDate. 11- Repeat question 7 and explain your observation on the indexing performance and improved query speed

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!