Given the following mongoDB documents for the Contacts collection, complete the next 3 questions [ { “_id”:1, “Contact”:{“fname”:“John”, “lname”:“Doe”, “Phone”:“9055551212”}, “balance”:1000}, { “_id”:2, “Contact”:{“fname”:“Jane”, “lname”:“Smith”, “email”:“jsmith@dom.com”}, “balance”:786.45},  { “_id”:3,“Contact”:{“fname”:“Raj”, “lname”:“Patel”, “email”:“rpatel@ema.com”}} ]   Write the OUTPUT for the third statement (MongoDB Shell) below assuming the first 2 have already been executed successfully: > db.Contacts.update( {“_id”:2},{“$inc”: {“balance” : 12.45}}) > db.Contacts.update( {“_id”:1},{“$inc”: {“balance” : 19.99}}) > db.Contacts.find({“_id” : {“$lte” : 2}})

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter3: The Relational Database Model
Section: Chapter Questions
Problem 10P
icon
Related questions
Question

Given the following mongoDB documents for the Contacts collection, complete the next 3 questions

[
{ “_id”:1, “Contact”:{“fname”:“John”, “lname”:“Doe”, “Phone”:“9055551212”}, “balance”:1000},
{ “_id”:2, “Contact”:{“fname”:“Jane”, “lname”:“Smith”, “email”:“jsmith@dom.com”}, “balance”:786.45}, 
{ “_id”:3,“Contact”:{“fname”:“Raj”, “lname”:“Patel”, “email”:“rpatel@ema.com”}}
]

 

Write the OUTPUT for the third statement (MongoDB Shell) below assuming the first 2 have already been executed successfully:

> db.Contacts.update( {“_id”:2},{“$inc”: {“balance” : 12.45}})
> db.Contacts.update( {“_id”:1},{“$inc”: {“balance” : 19.99}})
> db.Contacts.find({“_id” : {“$lte” : 2}})

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning