You work for a mail delivery company and the tracker system uses MongoDB with the following document schema for the "Packages" collection:

{
  "_id": { "bsonType": "objectId" },
  "destination": { "type": "string" },
  "state": { "enum": ["preparing", "in transit", "delivered"] }
}

Select all the correct statements about the Packages collection.

(Select all acceptable answers.)

Inserting a document with "state": 2 in the collection will set the state as "in transit".
The Packages collection schema allows inserting documents with fields other than "_id", "destination", and "state".
The "_id" can be omitted when inserting a document in the Packages collection.
A number inserted in the "destination" field will be converted to a string on insertion.
Indexes can be added to the Packages collection without modifying the document schema.
The "state" in the documents of the Packages collection must be an array.
   

Tags
MongoDB Database Schema New Public
Easy

3min

Would you like to see our other questions?

We have 1000+ premium hand-crafted questions for 160+ job skills and 20+ coding languages. We prefer questions with small samples of actual work over academic problems or brain teasers.

Visit our question library
Private Concierge

Send us an email with an explanation of your testing needs and a list of candidates. We will create an appropriate test, invite your candidates, review their results, and send you a detailed report.

Contact Private Concierge

On the TestDome Blog

Screening Applicants: The Good, the Bad and the Ugly

Since we’re all biased and we use incorrect proxies, why not just outsource hiring to experts or recruitment agencies? After all, they’ve been screening people for many years, so they must know how to do it right?

Not really. I was surprised to discover that many experts disagree with each other. Everybody praises their pet method and criticizes the others. Many of these methods look legitimate, but are based on...

Dashboard Start Trial Sign In Home Tour Tests Questions Pricing