Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed
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

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions