Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . NoSQL ( 5 0 points ) You will show all of the code needed to do the following and screenshots where requested. When
NoSQL points
You will show all of the code needed to do the following and screenshots where requested. When you show code in this document, you will paste it as text do not use pictures of code.
Create two collections in MongoDB. These collections can be about anything you want, but they should be original to you. Each collection should have at least four fields columns and five documents rows Each collection should also have a mix of numeric and text fields. The two collections should also have some column with common values that would be suitable for joining the two collections together.
Show all the code you used to create these two collections.
Now, you will write some queries and show the code and results for each query.
Write a query that shows the entire contents of one collection. Show the code you used and a screenshot of the output.
Write a query that shows only two fields from one of your collections, and neither of these is the id field. The query should also filter out some but not all of the documents using an inequality condition eg greater than or less than on a numeric field. Show the code you used and a screenshot of the output.
Write a query that uses either an $or operator or an $and operator. The query must return more than one document. Sort the results in some way. Show the code you used and a screenshot of the output.
Write a single query that returns data from both collections. Show the code you used and a screenshot of the output.
Finally, you will change some data in your collections.
Update one or more documents in one collection. Show the code you used and a screenshot of the contents of the collection after the update.
Delete one or more documents in the other collection, but do not delete all the documents. Show the code you used and a screenshot of the contents of the collection after the deletion.
Obviously, you have a wide amount of latitude in how you could implement these requirements. Given all the possible variations in your approach, wouldnt it be very strange if your code and data ended up looking very similar to your friends code and data? Yes, it would be very strange and very noticeable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started