Answer the question
In order to leave comments, you need to log in
What is the best way to organize a database with a lot of changing parameters?
(For admins - php was added to the tags in order to indicate - the selection from the database will be carried out through Eloquent ORM, so an effective solution in terms of performance is important)
Question, there is such a section in the project - measuring body parameters.
The first thing that suggests itself is to make a simple flat table
body_dimensions
---
id
weight
bust (объем груди)
waist (объем талии)
hip (объем бедер)
fat (массовая доля жира для тех, у кого умные весы)
visceral fat (висцеральный жир)
muscle (мышцы)
bones (кости)
water (доля воды)
created_at
updated_at
user_id
body_dimensions
---
id
created_at
updated_at
user_id
body_params
---
id
param
body_dimensions_params
---
id
param_id
user_id
value
body_dimensions
---
id
created_at
updated_at
dimensions : json (тут будут измерения {param_id : value})
user_id
body_params
---
id
param
Answer the question
In order to leave comments, you need to log in
If you do not link data between clients, display the average temperature for a hospital, for example, then you do not need a database.
You need to keep a history of changing some parameters in the client file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question