Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 3 4 0 Module Eight Assignment Guidelines and Rubric Overview We will be demonstrating advanced query operations for this assignment. Advanced queries will let

CS 340 Module Eight Assignment Guidelines and Rubric
Overview
We will be demonstrating advanced query operations for this assignment. Advanced queries will let you analyze data in a more programmatic fashion at the database layer. Since the key-value structure of an NoSQL database closely resembles the object-oriented data structures of many programming languages, this likeness will enhance the ease and portability of MongoDB queries. The aggregation pipeline facility of MongoDB gives us a set of operators to enable limited set theory operations (grouping, intersections, and so on) for documents within the same collection.
Prompt
After completing the textbook reading and reviewing the module resources, complete the following tasks using the MongoDB shell.
Using the mongoimport tool, create the database companies by loading the documents found in the companies.json file into the research collection. This file is located in the /usr/local/datasets/ directory in Apporto. Verify your load by issuing the following queries:
db.research.find({"name" : "AdventNet"})
db.research.find({"founded_year" : 1996},{"name" : 1}).limit(10)
Provide screenshots of your statements and the results as evidence.
Perform the following tasks using MongoDB queries:
List only the first 20 names of companies founded after the year 2010, ordered alphabetically.
List only the first 20 names of companies with offices in either California or Texas, ordered by the number of employees and sorted largest to smallest.
Provide screenshots of your statements and the results as evidence.
Design and implement a MongoDB aggregation pipeline to show the total number of offices by state for all companies that have offices in the United States. Be sure that you account for the fact that some companies have offices in several states. Explain your aggregation pipeline.
Provide screenshots of your statements and the results as evidence.

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

Students also viewed these Databases questions