Store JSON documents
The document store is a serverless database for app data: collections of documents, each with typed fields. There are no servers to size, and you pay for what you use.
Video, 1:08. Storage and data.
Steps
- Overview (0:00)
- A new database (0:13)
- First document (0:26)
- Saved (0:39)
- Query (0:49)
- One match (0:56)
- Try it yourself (1:03)
Transcript
The document store is a serverless database for app data: collections of documents, each with typed fields. There are no servers to size, and you pay for what you use.
Under Databases, open Document store and create a database called orders-db. Keep it in Mumbai. Deletion protection is on by default.
Add the first document. It goes into a new collection called orders. Each field has a type: the customer name, the total as an integer, and the status.
Saved. Collections, documents and fields, side by side. We add a second order, which is still pending.
Now query the orders collection for documents where status equals paid.
Only the paid order comes back, with its field types, and the exact read time.