readyforhires

Advanced Firebase test (Advanced)

40 questions · 40 minutes · Free

Data modelling at scale, cost control, emulators, testing and FCM.

Take the Advanced Firebase test

What it covers

Interview format

Earn a certificate

The Advanced Firebase test is one of the 4 tests of the Flutter Developer: Advanced learning path. Pass it and the other 3 tests at 70% or more and readyforhires issues you a verifiable certificate in your name, with its own code and verify link to share or add to LinkedIn.

Sample learning path certificate for Flutter Developer: Advanced, made out to “Your name” and marked SAMPLE
Pass with 70% or more to earn a verifiable certificate. This is a sample: yours carries your name, the date you earned it and its own verify code.

Sample questions

5 sample questions from the Advanced Firebase test, with the answers. Samples are taken out of the live test, so you will not meet these when you sit it.

  1. Which statement accurately describes Firestore composite indexes and their role in query performance?

    1. Composite indexes are only needed for collection-group queries.
    2. Composite indexes are not required for Firestore performance, as queries are optimized automatically.
    3. Composite indexes are defined in firestore.indexes.json and must be explicitly created for compound queries.
    4. Composite indexes are automatically created for all compound queries.

    Answer: C. Composite indexes are defined in firestore.indexes.json and must be explicitly created for compound queries.

    Firestore requires that composite indexes be explicitly defined in firestore.indexes.json for compound queries to function correctly. Single-field indexes are automatically created, but compound queries require composite indexes. The other options are incorrect because they either describe incorrect behaviors (e.g., composite indexes are not auto-created) or unrelated concepts (e.g., document size limits).

  2. What is true about Firestore's data retention policies regarding subcollections when a document is deleted?

    1. Subcollections are deleted when the parent document is updated.
    2. Deleting a document automatically deletes all its subcollections.
    3. Deleting a document also deletes all documents in the same collection.
    4. Deleting a document does not delete its subcollections.

    Answer: D. Deleting a document does not delete its subcollections.

    In Firestore, when a document is deleted, its subcollections are not automatically deleted. Subcollections are treated as separate entities and must be explicitly deleted if needed. This behavior is important to understand when designing data models and managing data retention policies.

  3. You are building an e-commerce app with a Firestore database, and you need to optimize read performance for order details that are frequently accessed along with user profile data. Which of the following approaches would best align with Firestore's best practices for data modeling?

    1. Store user profile data as a subcollection under each order document and query it separately.
    2. Use server-side joins to fetch user profile data dynamically when querying order details.
    3. Denormalize and duplicate the user profile data in each order document, as it is frequently read together with order details.
    4. Store user profile data in a separate collection and reference it using document IDs in order documents.

    Answer: C. Denormalize and duplicate the user profile data in each order document, as it is frequently read together with order details.

    Firestore recommends denormalizing data and duplicating information that is frequently read together to optimize read performance. In this scenario, since user profile data is accessed alongside order details, duplicating it in each order document ensures faster query execution without the need for additional joins or lookups.

  4. What happens when a Cloud Function is triggered by a Firestore write event in the Firebase emulator suite if the emulator is not connected to the suite?

    1. The emulator will trigger the Cloud Function even if it is not connected to the emulator suite.
    2. The emulator will not trigger the Cloud Function because it is not connected to the emulator suite.
    3. The emulator will trigger the Cloud Function and execute the code as it would in production.
    4. The emulator will trigger the Cloud Function but will not execute the code.

    Answer: B. The emulator will not trigger the Cloud Function because it is not connected to the emulator suite.

    When using the Firebase emulator suite, any Cloud Functions must be connected to the emulator suite using the appropriate command. If the emulator is not connected, the Cloud Function will not trigger because the emulator suite is not running or the connection is not properly established.

  5. Which of the following statements accurately describes the billing behavior of Firestore queries in relation to pagination?

    1. A query using offset() will charge reads for all skipped documents.
    2. A query using startAt() will charge reads for all skipped documents.
    3. A query using startAfter() will charge reads for all skipped documents.
    4. A query using limit() will charge reads for all skipped documents.

    Answer: A. A query using offset() will charge reads for all skipped documents.

    Using offset() in Firestore queries charges reads for all skipped documents, which can be inefficient and costly for large datasets. In contrast, limit() and cursor pagination (startAfter) are recommended for efficient and cost-effective pagination.

Frequently asked questions

How many questions are in the Advanced Firebase test?
40 questions (24 multiple choice, 12 multi-answer, 4 predict-the-output), with 40 minutes to answer them.
What does the Advanced Firebase test cover?
Firestore data modelling, Firebase cost control, Firebase emulators and testing, Firebase Cloud Messaging, Firebase performance and analytics.
Is the Advanced Firebase test free?
Yes. It is free to take with a readyforhires account.
What level is the Advanced Firebase test?
Advanced, in Backend.

More Backend tests

Roles that test these skills

Companies that test these skills

All practice tests · All Backend tests

Last updated