ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 193 - Professional Cloud Developer discussion

Report
Export

You are designing a chat room application that will host multiple rooms and retain the message history for each room. You have selected Firestore as your database. How should you represent the data in Firestore?

A.
Create a collection for the rooms. For each room, create a document that lists the contents of the messages
Answers
A.
Create a collection for the rooms. For each room, create a document that lists the contents of the messages
B.
Create a collection for the rooms. For each room, create a collection that contains a document for each message
Answers
B.
Create a collection for the rooms. For each room, create a collection that contains a document for each message
C.
Create a collection for the rooms. For each room, create a document that contains a collection for documents, each of which contains a message.
Answers
C.
Create a collection for the rooms. For each room, create a document that contains a collection for documents, each of which contains a message.
D.
Create a collection for the rooms, and create a document for each room. Create a separate collection for messages, with one document per message. Each room's document contains a list of references to the messages.
Answers
D.
Create a collection for the rooms, and create a document for each room. Create a separate collection for messages, with one document per message. Each room's document contains a list of references to the messages.
Suggested answer: C

Explanation:

https://firebase.google.com/docs/firestore/data-model#hierarchical-data

asked 18/09/2024
Dewald Van Schalkwyk
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first