Use Visual Studio Code to demonstrate your MongoDB labs.
Make sure the following actions fit with the theme of your database. Do not do generic entries like “field1” and “value1”.
Insert three documents in your collection that includes an array value of three or four elements for each new document. For two of those documents have different array elements. With the third document use the same array elements as your second document, but this time have them ordered differently. Also include a key value pair that includes a number that can be incremented and decremented. Finally have the value for one of your key value pairs set to null. This step does not need to be demonstrated.
Demonstrate a successful search based on one element that exists in one of your arrays
Demonstrate a successful search that returns only one of the documents that have the same elements (it should miss the other document because the elements are in a different order). Demonstrate a successful search that returns both documents with the same elements.
Demonstrate a succesful search using $in.
Demonstrate a search for null referring the key value pair where you had included null in step one. Then show a search for not null.
Demonstrate a multi document update where you increase a mumeric key value pair by 10. Show the increase with a find and then decrease that same key value pair by 10 and reshow the result. Then show a single document update where you increase a numeric value by 5, demonstrate it worked and then reverse it.
Add a key value pair to one of the documents in your collection. Make this fit with the theme of your collection. Show this, then remove it and demonstrate the key value pair was successfully removed.
Demonstrate replacing one of your documents with a doument that includes an embedded document in your collection. Show it first and then update something in the embedded document.
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 three tasks.