Recall & Review
beginner
What is Cloud Firestore in mobile development?
Cloud Firestore is a flexible, scalable database for mobile, web, and server development. It stores data in documents, which are organized into collections, and syncs data in real-time across devices.
Click to reveal answer
beginner
How do you add a document to a Firestore collection in Swift?
Use the Firestore instance to reference a collection, then call addDocument(data:) with a dictionary of key-value pairs representing your data.
Click to reveal answer
beginner
What is the difference between a document and a collection in Firestore?
A document is a single record that contains fields with data. A collection is a group of documents. Collections can contain documents, and documents can contain subcollections.
Click to reveal answer
intermediate
How does Firestore handle real-time updates?
Firestore lets your app listen to document or collection changes. When data changes, Firestore sends updates instantly to keep your UI in sync without manual refresh.
Click to reveal answer
intermediate
What is a Firestore query and how is it used?
A Firestore query lets you retrieve documents that match specific conditions, like filtering by a field value or ordering results. Queries help you get only the data you need.
Click to reveal answer
Which Firestore data structure holds multiple documents?
✗ Incorrect
A collection is a container for multiple documents in Firestore.
How do you listen for real-time updates in Firestore on iOS?
✗ Incorrect
addSnapshotListener() sets up a real-time listener that triggers when data changes.
What type of data does a Firestore document store?
✗ Incorrect
Documents store data as key-value pairs, where values can be various types.
Which method adds a new document with an auto-generated ID in Firestore?
✗ Incorrect
addDocument(data:) creates a new document with a unique ID automatically.
How can you filter documents in Firestore?
✗ Incorrect
whereField() lets you specify conditions to filter documents in queries.
Explain how you would set up a Firestore listener in Swift to update your app UI in real-time.
Think about how Firestore notifies your app when data changes.
You got /5 concepts.
Describe the structure of data in Cloud Firestore and how documents and collections relate.
Imagine folders and files on your computer.
You got /4 concepts.