I can't get my head around this problem. I'm trying to find a good way to store this in a PostgreSQL database.
Each client of my company needs to visualize data that depends on a dynamic number of parameters.
clientA wants to store the prices of its products. A price is defined by
store_id. I need a way to query the database, giving the
store_id and get back a
clientB wants to store the power of its cars. A power is defined by
fuel_type. I need a way to query the database, giving the
fuel_type and get back a
Each client must be able to define its own "dimensions" or "parameters" that define the data they want to vizualize.
I can either :
- put all the data in the same table, with A LOT of empty columns for each row ==> seems dumb
- create a new table for each client, with only the right columns in each of them? I'm not used to having a table per client but maybe it's the way to go
- a third way I did not think of that tackles this exact problem