I am not sure if SO is a good place since I am looking for recommendation and guidance on a resource to learn about a use case at work.
I am looking to get some recommendation on the database design approach for a following use case.
Let's say that we have a user interface where a user can come and define certain dimensions
along with their type
age, Integer
name, String
credit score, Integer
And then, the user imports a CSV, that contains the headers which are nothing but dimensions that he has defined above.
age, name, timestamp
32, Ari, 560
44, Ben, 750
29, Ada, 700
How can define this relationship? A table containing the dimensions with type and another one which contains the data where columns match the dimensions?
Dimensions to Data
Additionally, the user can later change dimensions (add or delete)
and pass the corresponding file with those headers. Now as I see, the data is out of shape with the previous import. How can we achieve this using a relational DB? Can we minimize the Alter Statements
or create dynamic tables for everytime the dimensions change?
Dimensions
age, Integer
name, String
credit score, Integer
ltv, Double
Data
age, name, timestamp, ltv
32, Ari, 560, 0.34
44, Ben, 750, 0.76
29, Ada, 700, 0.88
Any guidance on resource to learn from are very much appreciated.