Which statement best describes how Firebase ensures document ID uniqueness within a collection?
Think about how Firebase handles document creation when no ID is specified.
Firebase generates a unique 20-character ID automatically for documents without a specified ID, ensuring uniqueness within the collection.
You want to store user profiles in Firebase Firestore. Which document ID strategy is best to ensure easy retrieval and uniqueness?
Consider which ID is guaranteed unique and consistent for each user.
The user's authentication UID is unique and consistent, making it ideal as a document ID for user profiles.
What is a major security risk when using predictable document IDs like sequential numbers in Firebase Firestore?
Think about what happens if someone can guess document IDs.
Predictable IDs can be guessed by attackers, potentially exposing data if security rules are weak.
Which document ID strategy balances uniqueness, readability, and performance in Firebase Firestore?
Consider what Firebase recommends for most use cases.
Firebase's auto-generated IDs are designed to be unique, efficient, and not too long, making them a good default choice.
How does choosing sequential numeric document IDs affect Firestore query performance compared to using Firebase's auto-generated IDs?
Think about how Firestore stores documents and handles writes.
Sequential IDs cause Firestore to write to the same storage location repeatedly, creating hotspots and slowing performance.