Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70796

Creating/storing series of numbers in Firestore and Ionic 4

$
0
0

@obinnae wrote:

I’m building a v4 app (Firebase Firestore backend) where a user can buy tags (8-digit alphanumeric characters like 00000001, a1234567, etc).
My question is, how do I store the tags in Firestore? For instance, if someone buys 100 tags (lets say from 00000001 to 00000100), should it create 100 Firestore records (one for each tag, {id:00000001, user:joe@email.com, date:20190101}…), or create just 1 record indicating the last tag purchased, so as to base the next purchase off it {minId:00000001, maxId:00000100, user:joe@email.com, date:20190101}?
I think the first option is better and easier to manage, but costs more due to multiple Firestore read/writes.

Any suggestions will be appreciated.

Thanks.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70796

Trending Articles