I have an App to manage a big Agriculture Store.
The question is about Bills
I want to be able to make bills (many bills), store them, return to edit them…
I cant recapitulate by saying : Table of tables.
It a list of bills, every bill have his own table of rows and columns…
If you are thinking about creating a new table for every bill, then it’s going to be an absolute nightmare to maintain your app, because you will have to design screens every time q new bill is created.
You might want to rethink your data layout. If structured correctly, you should only need one table to hold multiple bills.
The first table is your Bills table (think of this as holding all the parents)
The second table is your Bill Items table (think of this as holding all the children)
Each Bill can have one or more related Bill Items
The key here is to include a column in your Bill Items table to store the parent BillID value. This will allow you to create a relation between Bills and Bill Items
The not so simple option:
Use one table
Store all your Bill Items in a single column as a JSON structure
The second option is more efficient, but way more complex to setup and maintain. If you are new to Glide, I would strongly recommend the first option.
I understand your first solution… BUT…
In the Table of “Bill Items”, each Bill is not only a row (in which case, i can related to), But a huge table of Rows (Selled Products in this bill) and Columns (Their Caractéristics as : Quantity, Price…)
Yes, that’s the idea. You can have as many Bill Items as you want. They all get stored in the same table and you relate them to the parent Bill via the BillID.