I'm storing a list of recipe ingredients like this in Firestore:
Right now each array item is a String
. It's occurred to me that if I eventually want to complete actions on the data, such as sum quantities of identical ingredients or convert units, I should separate each array item into its parts:
- Quantity (
Int
) - Unit (
String
) - Food item (
String
)
How can data that can be broken down in that way be structured in a database (using Firestore in my case)? Would I need an array for each part?
https://stackoverflow.com/questions/66620432/best-way-to-structure-array-of-data-where-each-item-can-be-separated-into-differ March 14, 2021 at 10:07AM
没有评论:
发表评论