Question 16
You have to create a simple configuration file for mongod instance. Here are the requirements of your mongod instance: * run on port 27100 * authentication is enabled Which of the following configuration file meet these requirements?
Question 17
Suppose you have an accounts collection with the following document structure: { _id: ObjectId("61af47c6e29861661d063714"), account_id: 1010, type: 'investment', limit: 1000000 }, { _id: ObjectId("61af47c6e29861661d063715"), account_id: 4336, type: 'derivatives', limit: 100000 }, { _id: ObjectId("61af47c6e29861661d063716"), account_id: 4336, type: 'commodity', limit: 1000 } Which of the following documents would be modified by this update? db.accounts.updateMany( { "type": "investment" }, { "$set": { "limit": 2000000 } } )
Question 18
We have a movies collection with the following document structure: { _id: ObjectId("573a1390f29313caabcd6223"), genres: [ 'Comedy', 'Drama', 'Family' ], title: 'The Poor Little Rich Girl', released: ISODate("1917-03-05T00:00:00.000Z"), year: 1917, imdb: { rating: 6.9, votes: 884, id: 8443 } } We need to extract all movies from this collection where genres does not include 'Romance'. Which query should we use?
Question 19
Suppose we have a shipwrecks collection with the following document structure: { _id: ObjectId("578f6fa2df35c7fbdbaed8ce"), feature_type: 'Wrecks - Visible', watlev: 'always dry', coordinates: [ -79.9469681, 9.3729954 ] } You ran the command below: db.shipwrecks.getIndexes() And you got the following output: [ { v: 2, key: { _id: 1 }, name: '_id_' }, { v: 2, key: { coordinates: '2dsphere' }, name: 'coordinates_2dsphere', '2dsphereIndexVersion': 3 } ] How can you remove the geospatial index on the coordinates field?
Question 20
In your database there is a collection named companies with the following document structure: { name: 'Wize', relationships: [ { is_past: false, title: 'Head of Product', person: { first_name: 'Ethan', last_name: 'Smith', permalink: 'ethan-smith' } }, { is_past: true, title: 'Director, Business Development', person: { first_name: 'Stephanie', last_name: 'Quay', permalink: 'stephanie-quay' } }, { is_past: true, title: 'Sr. Engineer', person: { first_name: 'Stefan', last_name: 'Antonowicz', permalink: 'stefan-antonowicz' } } ] } Which of the following queries should you use to extract all companies that have "Co-Founder" title in relationships field (Array)?
