Question 41

Select all true statements regarding to unique indexes in MongoDB.
  • Question 42

    Select all true statements regarding to duplicate documents in MongoDB.
  • Question 43

    We have an accounts collection with the following document structure: { _id: ObjectId("5ca4bbc7a2dd94ee5816239d"), account_id: 864905, limit: 10000, products: [ 'Commodity', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239e"), account_id: 299072, limit: 10000, products: [ 'InvestmentFund', 'InvestmentStock' ] }, { _id: ObjectId("5ca4bbc7a2dd94ee5816239f"), account_id: 137994, limit: 10000, products: [ 'CurrencyService', 'InvestmentStock' ] } We need to use Aggregation Framework to find the distribution of products field. Sort the result set by decreasing total number of products. Expected output: [ { _id: 'InvestmentStock', total: 1746 }, { _id: 'CurrencyService', total: 742 }, { _id: 'Brokerage', total: 741 }, { _id: 'InvestmentFund', total: 728 }, { _id: 'Commodity', total: 720 }, { _id: 'Derivatives', total: 706 } ] Which pipeline should you use?
  • Question 44

    Select all true statements regarding to the insert operation.
  • Question 45

    Suppose you are connected to mongod instance that is already running on port 27000 as admin user. You have to export reviews collection from the restaurants database to JSON file named reviews.json. Which command should you use?