Best database structure for car wash app

Hi! I’m building my first app in Glide for a car wash business, and I’d like your opinion on how to structure the database.

The business has 4 branches, each with a manager who will record every car that comes in — including the license plate and the amount paid (about 60 cars per day per branch).

My idea is to create two Glide tables:

  • One table with the records of each car entry, filled in by the branch managers (this table would need to be cleared every 30 days, since it generates around 12,000 rows per month).
  • A second table that consolidates the data by day and branch, so I can generate monthly reports for the number of cars washed and total sales — by branch, by month, and by year. (This table would generate about 1,400 rows per year).

The problem I’m facing with this structure is that when I delete the first table, I lose the references or data connections in the second table that contains the daily reports.

Could someone please confirm if this structure makes sense for this type of app, or if I should approach it differently?

This sounds reasonable.

When I build reports where usually I’ll need to consolidate by month or by quarter based on the data of another table, I create a table per report: one table with the months of the year (12 rows) for the monthly report, another table with the quarters (4 years) for the quarterly report, and so on. In your case, perhaps another table with the branches (4 branches) for the branches report.

I like the idea you’re suggesting, but how do you create these new tables that consolidate data by month if they depend on the first table, which is deleted at the start of the next month?

I think my problem might be understanding how to “lock in” or fix certain values from the first table so that they aren’t deleted when that main table is cleared.

Another idea that is different is you could Export the glide records via API at the end of each month through make.com, and then use a non connected google sheet to generate the other reports, that could all be automated, and you could send back single row of summary data just for user interface purposes in the app if needed. Just a thought

Do not delete any data.
You should have only one main table, and that table should simply unpack a JSON file that contains all of your data.
Whenever you add a new car, just append it to the JSON and save the updated file using a custom API on the platform of your choice — Glide, Google Sheets, Google Drive, or your own server.

When the app opens, load that JSON file and unpack only the relevant part of the data into a helper table for display or processing.

You can keep that JSON in Glide table whithout using external platforms.

1 Like

@Mauro_Candreva

I agree with this. Preferably, don’t delete data.

Ideas that come to mind:

  1. Use a plan that gives you enough rows. Perhaps use Glide Big Tables. This would be my preferred approach.
  2. @UseSoft ‘s JSON approach. I have no idea if this works, I’ve never touched JSON before, but I’ve seen this approach discussed on the forum.
  3. @Myles_Chaput’ s export your data approach via an integration. Or why not even by hand if that were feasible. It sound’s complex to set up and maintain, especially if this is going to be recurring.
  4. Maybe you could create a workflow that would write aggregated data at regular intervals, monthly for instance, to a separate table.

I like the idea of not having to delete anything, but one month already generates ~10,000 rows, and my Glide Explorer plan only allows 25k. I also tried options using workflows, but I burned through updates very quickly.

Now I’m trying the approach that @useSoft suggested, but I can’t seem to finish appending to the JSON file. My understanding is that I should have a main table with the branches where the data is stored in a JSON file. However, when I try to update that JSON via a Glide form, I keep running into roadblocks. I even created an auxiliary table to capture the inputs and build the JSON there, with the idea of relating it back to the branch in the main table, but Glide still doesn’t let me complete it. Maybe it’s a limitation of my current plan…

If you have no interest in keeping the data after a month, I would just create a query that returns all rows in the table and use a button with a Delete Row action to delete all rows though the Query. I would never delete the table itself.

1 Like

You need to estimate the size of your data first. Glide allows up to 1MB per row, so if your JSON grows beyond that, you’ll need to split it, for example: one month of data per row is a safe structure if you’re storing it inside a Glide Table.

If you use external storage instead (like your own server, Firebase, Supabase, or Google Drive), the fetch limit is typically around 10MB per request, which is enough to store multiple years of simple structured data, as long as you’re not embedding large media files like images or PDFs.
I recommend using a JSON array instead of a JSON object . This saves a significant amount of memory because you’re not repeating the field (column) names for every entry. With large datasets, that overhead adds up quickly. Arrays let you store just the raw values, which makes the file smaller, faster to parse, and easier to paginate or chunk later if needed.

Yes, I did that. Thanks

1 Like

Thanks for your reply. For now, I think 1 MB per row is fine. I’m currently not using external storage, since I intend to keep everything inside Glide.

What I can’t figure out is how to add multiple wash records into the same JSON object (field). Whenever I use forms, they always create new rows. JSON arrays aren’t included in my Explorer plan.

I’ve tried using an auxiliary table for data entry, creating a JSON object there, and then relating it to the same field so all entries would append — but I haven’t been able to make it work either.

Maybe you could share an example or some documentation on how to perform multiple entries against a single JSON object so that it grows over time.

JSON arrays do not require a paid plan — they can be used on the free plan.
Instead of using a form, create a new screen with entry fields that write data into user-specific columns. Add a submit button with a Create action that takes the entered values, combines them in a template column into a JSON array like [data1, data2, data3] , and merges it with the base array using a JavaScript column. The return value from that JavaScript column then overwrites the base JSON array, after that, clear entered data and close that window.

Important: if multiple apps are writing data at the same time, I recommend using Google Apps Script or PHP on an external server to avoid overwriting data by waiting for the previous write operation to finish.
But if there is only one person at your carwash entering data, or if the time between cars is greater than 10 seconds, you can handle everything directly in Glide.