Hey everyone, I hope you are doing good!
I feel really glad to be back here after a very long time
I am developing a project in which this time I’ve chosen Firebase as my main database (this is my first time working with firebase). In this project, I mainly have two things I need to store - stores & their orders. So I needed a data structure format that would make it easy for me to retrieve any order data easily.
I’ve come up with a database format idea that looks like this :
Let me explain the whole workflow. When someone posts an Order, the Order ID becomes a sub-bucket key, and the order’s details are that sub-buckets’ items. Ultimately, the order gets stored as a sub-bucket under the main bucket of the store.
Now, since it’s my first time using Firebase, I am kind of confused with creating a new sub-bucket (with items in it) under a main bucket of the Store, and how to retrieve any Order’s (sub-bucket’s) details later. I’ve so far tried many combinations of blocks I could possibly think of, and it doesn’t seem to work out. Can you please guide me?
Thanks a lot for reading!