Sale!

DBS 311 Lab 9 solution

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (4 votes)

Make sure the following actions fit with the theme of your database. Do not do generic entries like “field1” and “value1”.

 

  1. Insure your collection has documents that allows grouping by a key value pair. Have two groups with three documents and one group with four documents at minimum. Show the number of documents in each group and include one other key value pair that you do something with. The classroom example was average duration in minutes for books in the group.

 

  1. You should already have a date key value pair in your documents in your collection. Do a date calculation for all your documents. The classroom example was years since published for audiobooks.

 

  1. Demonstrate a conditional remove based on a value in a key value pair. The classroom example showed only showing a middle name for an author if there was a middle name and not a space. You can do something similar, or something that fits with your collection construction that allow some key value pairs to show and some to be suppressed.

 

  1. Demonstrate a sort of the documents in your collection. Be prepared to go in ascending or descending order.

 

  1. Demonstrate adding an array element to a key value pair with $push. Show your array before, add the element and show your array after.

 

  1. Look in the mongoDB manual and show something you have not seen in class but find interesting.

 

The best way to do demonstrate this lab is to have all the statements teed up and ready to execute in the order listed above.

 

The marking for this lab starts at 5/10 if you can do at minimum one task.