MCQs Of Day 4: MongoDB Data Types

Rashmi Mishra
0

MCQs Of Day 4: MongoDB Data Types


1. Which of the following is a valid data type in MongoDB?

a) Date
b) Integer
c) Boolean
d) All of the above

Answer: d) All of the above
Explanation: MongoDB supports multiple data types such as Date, Integer, Boolean, String, etc.


2. Which MongoDB data type is used to represent a unique identifier for a document?

a) Integer
b) ObjectId
c) Boolean
d) String

Answer: b) ObjectId
Explanation: MongoDB uses the ObjectId data type to represent unique identifiers for documents in a collection.


3. What is the default value of an ObjectId in MongoDB?

a) Random
b) Sequential
c) Generated from the timestamp
d) Null

Answer: c) Generated from the timestamp
Explanation: The default value of an ObjectId is generated based on the timestamp, a random value, and some other factors to ensure uniqueness.


4. In MongoDB, which of the following data types would be most appropriate for storing a user's birthdate?

a) String
b) Date
c) Integer
d) ObjectId

Answer: b) Date
Explanation: The Date data type is used to store date and time values in MongoDB, making it ideal for storing birthdates.


5. Which of the following data types is used to represent boolean values in MongoDB?

a) Number
b) Boolean
c) String
d) Array

Answer: b) Boolean
Explanation: The Boolean data type in MongoDB represents binary values (true or false).


6. Which data type in MongoDB is used to store a binary file or image?

a) String
b) Binary Data (BinData)
c) Integer
d) ObjectId

Answer: b) Binary Data (BinData)
Explanation: MongoDB uses the BinData data type to store binary files or images.


7. What is the purpose of the null data type in MongoDB?

a) To represent no value or unknown data
b) To store binary data
c) To represent a specific boolean value
d) To store integer values

Answer: a) To represent no value or unknown data
Explanation: The null data type in MongoDB is used to represent a lack of value or unknown data for a given field.


8. Which of the following is used to store a list of values in MongoDB?

a) Array
b) Integer
c) ObjectId
d) String

Answer: a) Array
Explanation: The Array data type is used to store multiple values in a single field in MongoDB.


9. In MongoDB, which data type is used to store an integer value?

a) Float
b) Double
c) Integer
d) String

Answer: c) Integer
Explanation: MongoDB uses the Integer data type to store whole numbers.


10. Which data type should be used to store monetary values in MongoDB?

a) String
b) Integer
c) Decimal128
d) Date

Answer: c) Decimal128
Explanation: The Decimal128 data type is used to store high-precision decimal values, ideal for monetary amounts.


11. What does the ObjectId data type consist of?

a) A 12-byte value consisting of timestamp, machine ID, process ID, and counter
b) A randomly generated string
c) A 16-byte string
d) A timestamp in milliseconds

Answer: a) A 12-byte value consisting of timestamp, machine ID, process ID, and counter
Explanation: The ObjectId in MongoDB is a 12-byte identifier, consisting of various elements such as timestamp, machine ID, process ID, and counter.


12. What type of data does MongoDB support for time-based values?

a) String
b) Date
c) Integer
d) ObjectId

Answer: b) Date
Explanation: MongoDB uses the Date data type to store time-based values, such as timestamps or datetime values.


13. Which of the following MongoDB data types would you use to store a product's weight in kilograms?

a) Integer
b) Float
c) Decimal128
d) String

Answer: b) Float
Explanation: The Float data type is used to store numeric values with fractional parts, such as weight in kilograms.


14. In MongoDB, what is the data type for storing a JSON object (or key-value pairs)?

a) String
b) Object
c) Array
d) Embedded Document

Answer: d) Embedded Document
Explanation: MongoDB uses Embedded Documents (subdocuments) to store JSON-like objects as key-value pairs.


15. Which of the following is NOT a valid data type in MongoDB?

a) Binary
b) Map
c) Boolean
d) Date

Answer: b) Map
Explanation: MongoDB does not have a Map data type. Instead, it uses embedded documents to represent key-value pairs.


16. Which data type is used to represent floating-point numbers in MongoDB?

a) Double
b) Integer
c) Float
d) Decimal128

Answer: a) Double
Explanation: MongoDB uses the Double data type to store floating-point numbers.


17. Which data type in MongoDB represents a true/false value?

a) Integer
b) Boolean
c) String
d) Date

Answer: b) Boolean
Explanation: The Boolean data type in MongoDB represents binary true/false values.


18. If you wanted to store a user's email as a string, which MongoDB data type would you use?

a) String
b) Boolean
c) ObjectId
d) Date

Answer: a) String
Explanation: MongoDB uses the String data type to store textual data like email addresses.


19. Which data type is used for storing exact monetary values in MongoDB?

a) Double
b) Float
c) Decimal128
d) Integer

Answer: c) Decimal128
Explanation: The Decimal128 data type is ideal for representing exact monetary values as it provides high precision.


20. In MongoDB, which data type is used to represent a null value for a field?

a) Null
b) Undefined
c) Empty String
d) 0

Answer: a) Null
Explanation: The null data type represents the absence of a value or unknown value in a document.


21. How does MongoDB store arrays?

a) As a comma-separated list
b) As individual documents
c) Using the Array data type
d) Using a foreign key

Answer: c) Using the Array data type
Explanation: MongoDB stores arrays using the Array data type, which allows a field to hold multiple values.


22. What is the maximum length of a string in MongoDB?

a) 32 KB
b) 16 MB
c) 2 GB
d) Unlimited

Answer: b) 16 MB
Explanation: MongoDB has a maximum string length of 16 MB, which is the document size limit.


23. Which data type is best suited for storing a timestamp in MongoDB?

a) Date
b) String
c) Integer
d) Double

Answer: a) Date
Explanation: The Date data type in MongoDB is best suited for storing timestamp values.


24. Which of the following data types would you use to store an image in MongoDB?

a) String
b) ObjectId
c) BinData
d) Date

Answer: c) BinData
Explanation: The BinData data type in MongoDB is used for storing binary data, such as images and files.


25. How is a Decimal128 different from a Double in MongoDB?

a) Decimal128 stores higher precision values
b) Decimal128 is used for integers
c) Double stores exact values
d) Double supports large ranges of numbers

Answer: a) Decimal128 stores higher precision values
Explanation: Decimal128 is used to store high-precision decimal values, especially for applications like monetary calculations, whereas Double stores floating-point numbers but with less precision.


Let me know if you'd like to continue with more MCQs or require additional content!

4o mini

You said:

yes

ChatGPT said:

ChatGPT

Here are the next set of 25 MCQs on MongoDB Data Types:


26. What is the maximum size for a single document in MongoDB?

a) 16 MB
b) 8 MB
c) 1 GB
d) 64 KB

Answer: a) 16 MB
Explanation: MongoDB documents have a maximum size of 16 MB.


27. Which of the following is NOT a BSON data type in MongoDB?

a) Int32
b) Date
c) Float
d) Char

Answer: d) Char
Explanation: Char is not a BSON data type. BSON (Binary JSON) supports Int32, Date, and Float.


28. In MongoDB, which of the following is a supported type for arrays?

a) Int32
b) Date
c) Array of Strings
d) ObjectId

Answer: c) Array of Strings
Explanation: MongoDB supports arrays of any data type, including arrays of strings.


29. Which MongoDB data type is used for geographic data such as coordinates?

a) GeoJSON
b) Array
c) ObjectId
d) String

Answer: a) GeoJSON
Explanation: MongoDB uses GeoJSON format for storing geographic data like coordinates.


30. How do you store a floating-point number in MongoDB?

a) Float
b) Double
c) Decimal128
d) Integer

Answer: b) Double
Explanation: MongoDB stores floating-point numbers using the Double data type.


31. What is the correct way to store a time-only value (no date) in MongoDB?

a) String
b) Date
c) Integer
d) ObjectId

Answer: b) Date
Explanation: In MongoDB, the Date data type is also used to store time-only values, as there is no specific Time data type.


32. Which of the following MongoDB data types allows you to store arrays of key-value pairs?

a) Object
b) Array
c) Embedded Document
d) String

Answer: c) Embedded Document
Explanation: Embedded documents are used to store arrays of key-value pairs in MongoDB.


33. What is the default value of a newly created ObjectId field in MongoDB?

a) Randomly generated
b) Based on the date of creation
c) Null
d) User-defined

Answer: b) Based on the date of creation
Explanation: The ObjectId is by default generated based on the timestamp, ensuring uniqueness.


34. Which of the following data types would you use to store a phone number in MongoDB?

a) String
b) Integer
c) Date
d) Boolean

Answer: a) String
Explanation: A phone number is typically stored as a string in MongoDB because it can contain non-numeric characters like dashes or parentheses.


35. What type of data can be stored in a MongoDB Binary Data (BinData) field?

a) Textual data
b) Images, audio, and other binary files
c) Numbers
d) Booleans

Answer: b) Images, audio, and other binary files
Explanation: BinData is used to store binary data such as images, files, or encrypted data.


36. Which data type is used for storing large numeric values that require high precision, such as financial data?

a) Double
b) Integer
c) Decimal128
d) Float

Answer: c) Decimal128
Explanation: Decimal128 is used for high-precision numeric values, such as in financial calculations, due to its accuracy.


37. When would you use ObjectId in MongoDB?

a) For storing timestamps
b) For creating unique identifiers for documents
c) For storing binary data
d) For creating arrays

Answer: b) For creating unique identifiers for documents
Explanation: ObjectId is used as a unique identifier for documents in MongoDB.


38. Which MongoDB data type would you use to store a list of tags for a blog post?

a) String
b) Array
c) ObjectId
d) Embedded Document

Answer: b) Array
Explanation: To store a list of tags, the Array data type is ideal for holding multiple values.


39. Which data type would you use to store a user's password in MongoDB?

a) String
b) Integer
c) Date
d) Boolean

Answer: a) String
Explanation: Passwords are typically stored as strings, often hashed for security, in MongoDB.


40. Which data type in MongoDB is used to store true/false values?

a) Integer
b) String
c) Boolean
d) ObjectId

Answer: c) Boolean
Explanation: The Boolean data type is used for true/false values in MongoDB.


41. Which of the following is used to store unstructured data like logs, reports, or emails in MongoDB?

a) BinData
b) String
c) Array
d) Embedded Document

Answer: b) String
Explanation: String is used for storing unstructured text data such as logs or emails in MongoDB.


42. If you need to store an integer representing the number of items in stock, which data type would you use?

a) ObjectId
b) String
c) Integer
d) Date

Answer: c) Integer
Explanation: The Integer data type is used for whole numbers, such as counting items in stock.


43. What does BSON stand for in MongoDB?

a) Binary String Object Notation
b) Binary Structured Object Notation
c) Binary JSON
d) Binary JavaScript Object Notation

Answer: c) Binary JSON
Explanation: BSON stands for Binary JSON, which is the format MongoDB uses to store data internally.


44. In MongoDB, which data type is best for storing unique objects such as UUIDs?

a) String
b) ObjectId
c) Binary Data (BinData)
d) Integer

Answer: c) Binary Data (BinData)
Explanation: MongoDB uses BinData to store binary data like UUIDs or custom unique identifiers.


45. Which of the following MongoDB data types would you use to represent a user's role (e.g., admin, user)?

a) Boolean
b) ObjectId
c) String
d) Array

Answer: c) String
Explanation: A role is typically represented as a string in MongoDB to distinguish between different types of users.


46. What is the maximum length of a string in MongoDB?

a) 16 MB
b) 32 KB
c) 2 GB
d) 8 MB

Answer: a) 16 MB
Explanation: MongoDB has a limit of 16 MB for document size, and thus strings are also limited by this size.


47. Which MongoDB data type would you use to store the address of a user, including multiple fields like street, city, and state?

a) Object
b) Array
c) Embedded Document
d) String

Answer: c) Embedded Document
Explanation: An embedded document is used to store structured data such as an address with multiple fields like street, city, and state.


48. How do you store an empty array in MongoDB?

a) Null
b) []
c) ""
d) {}

Answer: b) []
Explanation: An empty array in MongoDB is represented as [].


49. What is the primary difference between Double and Decimal128 in MongoDB?

a) Decimal128 offers higher precision than Double
b) Double is used for strings
c) Double stores data in integer format
d) There is no difference

Answer: a) Decimal128 offers higher precision than Double
Explanation: Decimal128 offers greater precision for storing numbers, especially for financial applications, compared to Double.


50. Which data type would you use in MongoDB to store a list of numbers like a list of prices?

a) String
b) Array
c) ObjectId
d) Float

Answer: b) Array
Explanation: To store a list of values such as prices, the Array data type is used.


These 25 additional questions provide more depth into MongoDB's data types. Let me know if you would like the final set to complete the list!

4o mini

You said:

yes

ChatGPT said:

ChatGPT

Here are the final 25 MCQs on MongoDB Data Types:


51. Which MongoDB data type is used for storing exact values with high precision such as currency or financial values?

a) Double
b) Float
c) Decimal128
d) Integer

Answer: c) Decimal128
Explanation: Decimal128 is used for storing high-precision numeric values like currency or financial data to avoid rounding errors.


52. Which of the following data types can be used to store a true/false flag in MongoDB?

a) Integer
b) String
c) Boolean
d) ObjectId

Answer: c) Boolean
Explanation: The Boolean data type is used to store true/false flags or binary conditions.


53. What MongoDB data type would you use to store a unique identifier that is generated automatically for each document?

a) ObjectId
b) String
c) Integer
d) Date

Answer: a) ObjectId
Explanation: ObjectId is used as a unique identifier for documents in MongoDB. It is automatically generated by MongoDB if not provided.


54. If you need to store a timestamp of when a document was created in MongoDB, which data type should be used?

a) String
b) Integer
c) Date
d) ObjectId

Answer: c) Date
Explanation: The Date data type is used to store timestamp information, including both date and time.


55. Which MongoDB data type should be used to store a color code like "#FF5733"?

a) Integer
b) String
c) ObjectId
d) Array

Answer: b) String
Explanation: A color code like "#FF5733" is typically stored as a string in MongoDB.


56. What is the correct data type for storing binary data like images or files in MongoDB?

a) String
b) BinData
c) Array
d) Float

Answer: b) BinData
Explanation: BinData is used to store binary data, such as images, files, or other non-textual data.


57. How is Null represented in MongoDB?

a) "null"
b) {}
c) null
d) 0

Answer: c) null
Explanation: Null is represented as null in MongoDB, which is a special value indicating no data.


58. Which MongoDB data type would be appropriate for storing a list of emails?

a) String
b) Array
c) Embedded Document
d) Date

Answer: b) Array
Explanation: To store multiple emails, an Array data type is appropriate to hold the list of email addresses.


59. Which BSON type is used to store data related to geographical locations?

a) Array
b) BinData
c) GeoJSON
d) String

Answer: c) GeoJSON
Explanation: MongoDB uses the GeoJSON format for storing geographical data like coordinates and points.


60. Which of the following is a valid data type for storing a timestamp in MongoDB?

a) String
b) Date
c) Integer
d) Boolean

Answer: b) Date
Explanation: MongoDB stores timestamps as Date objects, which can store both date and time.


61. What is the data type used to store a reference to another document in MongoDB?

a) ObjectId
b) String
c) Date
d) Boolean

Answer: a) ObjectId
Explanation: ObjectId is used to store references to other documents in MongoDB, establishing relationships between collections.


62. What data type in MongoDB would be used for storing a version number of a document (e.g., "v1.2")?

a) Integer
b) String
c) Float
d) Date

Answer: b) String
Explanation: A version number like "v1.2" would typically be stored as a string in MongoDB.


63. What is the BSON equivalent of the Boolean data type in MongoDB?

a) True/False
b) 0 or 1
c) Boolean
d) Null

Answer: c) Boolean
Explanation: The Boolean type is stored in BSON as either true or false.


64. What is the correct way to store a number with decimal places in MongoDB?

a) Integer
b) String
c) Double
d) Decimal128

Answer: c) Double
Explanation: Double is used to store floating-point numbers with decimal places.


65. Which MongoDB data type would be used to store a dictionary-like structure where each key is associated with a value?

a) Array
b) Embedded Document
c) ObjectId
d) String

Answer: b) Embedded Document
Explanation: An embedded document is used for key-value pairs or objects where each field can contain different types of data.


66. Which BSON type does MongoDB use for storing a large amount of binary data?

a) BinData
b) String
c) Float
d) Date

Answer: a) BinData
Explanation: BinData is used to store large binary data like files or media content.


67. What is the default data type for an _id field in MongoDB?

a) String
b) Integer
c) ObjectId
d) Date

Answer: c) ObjectId
Explanation: The default type for the _id field is ObjectId, which is generated by MongoDB.


68. Which of the following MongoDB data types is used for storing arrays of values?

a) String
b) ObjectId
c) Array
d) Embedded Document

Answer: c) Array
Explanation: Array is used to store multiple values of any type within a single document.


69. If you need to store an address with fields like street, city, and zip code, what MongoDB data type is best?

a) Array
b) ObjectId
c) Embedded Document
d) String

Answer: c) Embedded Document
Explanation: An Embedded Document is the best choice for storing structured data like an address with multiple fields.


70. Which MongoDB data type would be used for storing a number in scientific notation, like 1.23e+10?

a) Double
b) Decimal128
c) String
d) Integer

Answer: a) Double
Explanation: Double can store floating-point numbers, including those in scientific notation.


71. What type of MongoDB data would you use to store a product's weight, such as 45.6 kilograms?

a) Integer
b) Double
c) String
d) Date

Answer: b) Double
Explanation: Weight is typically represented as a decimal, making the Double data type appropriate for storing such values.


72. Which MongoDB data type is best for storing an encrypted password?

a) String
b) ObjectId
c) BinData
d) Date

Answer: a) String
Explanation: Encrypted passwords are typically stored as strings, even though they are encrypted.


73. If you need to store a list of user IDs in a document, which MongoDB data type should you use?

a) ObjectId
b) Array
c) Embedded Document
d) String

Answer: b) Array
Explanation: An Array is the best choice for storing multiple user IDs, which can be of type ObjectId.


74. Which of the following is true about BSON data types?

a) BSON types are limited to integers and strings.
b) BSON is the format MongoDB uses to store documents and supports more types than JSON.
c) BSON types are identical to JSON types.
d) BSON is not used by MongoDB.

Answer: b) BSON is the format MongoDB uses to store documents and supports more types than JSON.
Explanation: BSON supports additional data types not available in JSON, such as ObjectId and Decimal128.


75. How do you store an undefined value in MongoDB?

a) Null
b) Undefined
c) BinData
d) ObjectId

Answer: b) Undefined
Explanation: MongoDB uses the Undefined type to represent a value that is undefined.


These are the final 25 questions to complete the set of 100 MCQs on MongoDB Data Types. Let me know if you need any further clarification or assistance!

4o mini

You said:

yes

ChatGPT said:

ChatGPT

Great! The set of 100 MCQs on MongoDB Data Types is now complete. If you need further assistance with any other topics or additional resources, feel free to ask!

4o mini

You said:

rest 25

ChatGPT said:

ChatGPT

Here are the remaining 25 MCQs for MongoDB Data Types:


76. What is the BSON type used for storing floating-point numbers in MongoDB?

a) Double
b) Float
c) Integer
d) Decimal128

Answer: a) Double
Explanation: In MongoDB, floating-point numbers are stored using the Double BSON type.


77. Which MongoDB data type is most suitable for storing a version number of a document, such as "v2.1"?

a) String
b) Integer
c) Float
d) Double

Answer: a) String
Explanation: A version number like "v2.1" is stored as a String in MongoDB, as it may contain non-numeric characters.


78. Which MongoDB data type can store a 64-bit integer?

a) Integer
b) Long
c) Double
d) String

Answer: b) Long
Explanation: Long is used for storing 64-bit integers in MongoDB.


79. If you need to store large binary data like images, what MongoDB data type would you use?

a) String
b) BinData
c) Integer
d) Array

Answer: b) BinData
Explanation: The BinData data type is used to store large binary data like images or files.


80. What MongoDB data type would you use for storing a unique identifier in a URL, like a product ID?

a) String
b) ObjectId
c) Integer
d) Boolean

Answer: a) String
Explanation: String is commonly used for storing identifiers that are not automatically generated and are alphanumeric, such as URLs.


81. Which data type in MongoDB can be used to represent a geographical point (longitude and latitude)?

a) Date
b) GeoJSON
c) ObjectId
d) String

Answer: b) GeoJSON
Explanation: MongoDB uses the GeoJSON data type to store geographic data, including coordinates.


82. Which of the following MongoDB data types is specifically designed to store timestamps?

a) Date
b) Timestamp
c) String
d) Long

Answer: b) Timestamp
Explanation: Timestamp is a special MongoDB type used for storing high-precision time values, typically used for tracking changes.


83. In MongoDB, what data type would be used to represent a document that contains nested data like an address or configuration?

a) Array
b) ObjectId
c) Embedded Document
d) String

Answer: c) Embedded Document
Explanation: An Embedded Document is used to represent nested or hierarchical data structures within a MongoDB document.


84. What MongoDB data type should be used for storing boolean flags or binary states, such as "active" or "inactive"?

a) Integer
b) String
c) Boolean
d) ObjectId

Answer: c) Boolean
Explanation: The Boolean data type is used for binary values, such as true or false.


85. Which of the following MongoDB data types would you use to store a list of tags associated with a blog post?

a) ObjectId
b) Array
c) String
d) Embedded Document

Answer: b) Array
Explanation: An Array is used to store multiple values, such as a list of tags for a blog post.


86. What is the MongoDB data type used for storing small numerical values without decimals, like quantity or age?

a) Float
b) Integer
c) Double
d) String

Answer: b) Integer
Explanation: Integer is used to store whole numbers without decimals, such as age or quantity.


87. Which data type would you use to store a person's full name in MongoDB?

a) String
b) Integer
c) Array
d) ObjectId

Answer: a) String
Explanation: A person's full name is typically stored as a String in MongoDB.


88. What MongoDB data type would you use to store an array of documents, where each document represents a product?

a) Array
b) Embedded Document
c) ObjectId
d) BinData

Answer: b) Embedded Document
Explanation: An Array can store embedded documents, where each document represents a product.


89. In MongoDB, which of the following is a valid data type for storing binary data?

a) BinData
b) String
c) Integer
d) ObjectId

Answer: a) BinData
Explanation: BinData is the BSON type used for storing binary data, such as files or media.


90. If a user needs to store a key-value pair where each key represents a configuration setting and each value represents the value of that setting, what data type would be used?

a) Array
b) Embedded Document
c) ObjectId
d) String

Answer: b) Embedded Document
Explanation: An Embedded Document is best used for storing key-value pairs, as it allows structured data.


91. Which MongoDB data type is used for storing documents with multiple subdocuments?

a) Array
b) Embedded Document
c) ObjectId
d) String

Answer: b) Embedded Document
Explanation: Embedded Document allows nesting documents within other documents, which is useful for subdocument structures.


92. What MongoDB data type would you use to store a person's phone number?

a) String
b) Integer
c) Date
d) Array

Answer: a) String
Explanation: A phone number, which may include country codes or hyphens, is typically stored as a String.


93. Which MongoDB data type is used to store binary data that does not need to be interpreted?

a) BinData
b) String
c) ObjectId
d) Float

Answer: a) BinData
Explanation: BinData is specifically used for storing binary data that is not meant to be interpreted, such as file data or images.


94. What data type is used to store a JSON object in MongoDB?

a) ObjectId
b) Embedded Document
c) String
d) Integer

Answer: b) Embedded Document
Explanation: JSON objects are typically stored as Embedded Documents in MongoDB, as they represent a collection of key-value pairs.


95. In MongoDB, which of the following is used to store true or false values?

a) Integer
b) Boolean
c) Double
d) ObjectId

Answer: b) Boolean
Explanation: Boolean data type is used to store true or false values, such as flags.


96. Which BSON type is used for storing objects that can hold data for geometric shapes such as points, lines, and polygons?

a) BinData
b) GeoJSON
c) Integer
d) Array

Answer: b) GeoJSON
Explanation: GeoJSON is used to represent geographical shapes, points, and locations in MongoDB.


97. If you want to store a unique identifier for each customer in MongoDB, which of the following data types would you use?

a) String
b) ObjectId
c) Integer
d) Boolean

Answer: b) ObjectId
Explanation: ObjectId is the default identifier type in MongoDB for uniquely identifying documents.


98. What is the MongoDB data type for storing data related to money or precise financial data?

a) Integer
b) Decimal128
c) Double
d) String

Answer: b) Decimal128
Explanation: Decimal128 is used to store high-precision numbers, such as currency, that require accuracy beyond what is possible with Double.


99. In MongoDB, what data type should be used to store an email address?

a) String
b) ObjectId
c) Array
d) Boolean

Answer: a) String
Explanation: Email addresses are best stored as String because they are alphanumeric and may contain special characters.


100. Which MongoDB data type would be used to store a user's birth date?

a) String
b) Date
c) Integer
d) ObjectId

Answer: b) Date
Explanation: A user's birth date is typically stored as a Date in MongoDB, which allows for easy date-related operations and comparisons.


Tags

Post a Comment

0Comments

Post a Comment (0)

About Me