Challenge - 5 Problems
Firestore Data Types Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Firebase Firestore Supported Data Types
Which of the following data types is NOT supported by Firebase Firestore for storing in documents?
Attempts:
2 left
💡 Hint
Think about what kinds of data Firestore can store directly in documents.
✗ Incorrect
Firestore supports storing timestamps, geographic points, arrays, and many primitive types, but it does not support storing executable code like functions.
❓ service_behavior
intermediate2:00remaining
Behavior of Unsupported Data Types in Firestore
What happens if you try to store a JavaScript Date object directly in Firestore without converting it?
Attempts:
2 left
💡 Hint
Consider how Firestore expects date/time values to be formatted.
✗ Incorrect
Firestore automatically converts JavaScript Date objects to its own Timestamp type when storing.
❓ Configuration
advanced2:00remaining
Storing Nested Data Structures in Firestore
Given the following Firestore document data, which option correctly represents a nested map with an array inside?
Firebase
const data = {
user: {
name: "Alice",
roles: ["admin", "editor"]
}
};Attempts:
2 left
💡 Hint
Think about how Firestore stores objects and arrays.
✗ Incorrect
Firestore supports nested maps (objects) and arrays. Option A correctly uses a map with an array for roles.
❓ security
advanced2:00remaining
Security Implications of Storing Binary Data in Firestore
Which statement about storing binary data (like images) directly in Firestore is true?
Attempts:
2 left
💡 Hint
Consider Firestore's intended use and pricing model.
✗ Incorrect
Firestore is designed for structured data, not large binary files. Storing large binaries increases cost and latency.
❓ Architecture
expert3:00remaining
Choosing Data Types for Efficient Firestore Queries
You want to store a user's status that can be one of: 'active', 'inactive', or 'pending'. Which data type choice allows the most efficient Firestore queries and indexing?
Attempts:
2 left
💡 Hint
Think about how Firestore indexes and queries string fields versus other types.
✗ Incorrect
Storing status as a string allows clear, readable queries and efficient indexing. Boolean cannot represent three states. Numbers work but reduce readability. Arrays are not suitable for single status values.