As a complete outsider to the industry, learning table structure has been a process. Normalization and learning to use a SQL data base schema organizer has been key. Stuck here though…
My business provides services.
Price tier table with columns (ROW ID, Name, 1x Client Pay, 2x Client Pay, 3x Client Pay, 4x Client Pay, 1 Client Price, 2+ Client Price).
We offer several activities, each activity has one price tier. many activities can belong to same price tier.
Activities have multiple Billable Services. Billable services table has (ROW ID, ACTIVITY ID, PERSON COUNT - This is either Private, 1, or 2+). Essentially, clients get charged depending on if it is Private, 1 on 1 (without specific request for private), or 1 on X. This results in 3 different Prices. Staff however get paid based on how many people they have. Requested Private is X, 1 person is Y, 2 is Z, 3 is A, 4 is B. It is also not a linear scale as certain activities drastically change at different client thresholds (space available, supervision etc)
Originally, it appears all the data is there and available but the end result is it is quite difficult to query the price tier table and pull the data. You cannot have a value in the cell and have it lookup data from a specific row, in the coloumn that matches the value in the cell.
It must be a fundamental issue in structure, or im missing a way of looking up this data. Likely having pay and price in the same table isnt right.
I considered having a table that generates all possible combinations of Price tier and number of clients, and then each combo would have an ID, which could become the ID attached to any given service. This would be easily referenceable. What i cannot come up with is how to properly have this table generate itself.
I could create a complex workflow that added all rows but this feels wrong.
I have managed to acheive front end functionality through a long series of relation, lookup, relation, lookup, relation, lookup but it again, feels wrong.
Any suggestions? I can share the app as well but it has slightly different coloumn headings and labels. I adjusted here for clarity.