1. Which Firebase product is a document database with realtime listeners and rich queries?
- Remote Config
- Cloud Messaging
- Cloud Firestore
- Hosting
जवाब देखें
जवाब: Cloud Firestore
Firestore stores documents in collections.
पाठ: What Firebase Is
Firebase कोर्स के 25 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।
जवाब: Cloud Firestore
Firestore stores documents in collections.
पाठ: What Firebase Is
जवाब: Security Rules evaluated on every client request
The config is public; rules are the boundary.
जवाब: It identifies the project and is safe to include in client code
Access is controlled by rules and Auth, not by hiding the config.
जवाब: signInWithEmailLink
The link carries a one-time code in the URL.
जवाब: The user keeps the same uid, so data written as a guest stays theirs
Linking adds a credential to the existing user.
जवाब: Only from trusted code using the Admin SDK
Clients must not grant themselves roles.
जवाब: They remain and must be deleted separately
Subcollections are independent of the parent document's existence.
जवाब: In a subcollection with one document per comment
Documents have size limits; collections do not grow inside one document.
जवाब: Overwrites the whole document with the new data
Use { merge: true } or updateDoc to change some fields.
जवाब: A required composite index does not exist yet
Multi-field queries need composite indexes.
जवाब: Skipped documents are still read and billed, while cursors read only the page
Cursors are cheaper and stable.
जवाब: A function that removes the listener
Call it when the view is destroyed.
जवाब: Rules are not filters; the query must itself constrain authorId to the user's uid
Rules check whether every possible result is allowed.
जवाब: request.resource.data.diff(resource.data).affectedKeys().hasOnly(['displayName', 'bio'])
diff().affectedKeys() lists changed fields.
पाठ: Common Rule Patterns
जवाब: assertFails
Test denials as carefully as approvals.
जवाब: request.resource.contentType.matches('image/.*')
request.resource describes the incoming file.
जवाब: The Admin SDK bypasses Security Rules, so the function is the only guard
Trusted code carries the responsibility.
जवाब: In Secret Manager via defineSecret
Secrets stay server-side and out of source control.
जवाब: A temporary URL for a build that can expire automatically
Previews separate review from production.
जवाब: Trusted server code using the Admin SDK
Sending requires server credentials.
जवाब: The app must behave sensibly before or without a successful fetch
Networks fail; defaults keep the app working.
जवाब: It may be retried several times if data changes before commit
Retries would repeat the side effect.
जवाब: Document reads, writes and deletes
Query design drives read counts.
जवाब: With a Google Cloud service account
Service accounts are auditable and revocable.
जवाब: Highly relational data that benefits from joins and SQL queries
Firestore has no joins.