How best to organize a database with many editable parameters?

(For admins - php tags added in order to identify the sample from the database will be implemented using Eloquent ORM, so an important efficient solution from the performance point of view)

The question is, in the draft there is a section - measurement of body parameters.
The firstthat arises to make a simple flat table
body_dimensions
---
id
weight
bust (bust)
waist (waist)
hip (hip)
fat (fat content for those who have smart balance)
visceral fat (visceral fat)
muscle (muscle)
bones (bones)
water (percentage of water)
created_at
updated_at
user_id


Conveniently and quickly. But let's imagine - the customer starts under smart all scales of the world to throw a bunch of new parameters along the way, others expunged - then, we need notably to alter the structure of the table. What you do not want.

Option 2

body_dimensions
---
id
created_at
updated_at
user_id

body_params
---
id
param

body_dimensions_params
---
id
param_id
user_id
value


And here we are not dependent on the fact that there is added to the set of parameters can be freely expanded and even come up with the option of off or soft settings.
But there is another problem - the structure bulky and ORM-ka may begin to slow down (question knowledgeable - how this scheme is detrimental to performance within the ORM-OK, in particular Eloquent?)

The third scheme - JSON

body_dimensions
---
id
created_at
updated_at
dimensions : json (there are measures {param_id : value})
user_id

body_params
---
id
param


Here are just two tables - one contains the parameters for other measurement results. From the point of view of structure - the most interesting, should not cause the brakes and stuff. But what difficulties may arise when you build complex queries to the database? In this case elaborated JSON all the complex directly into the furnace or well-researched that question? Yourself for JSON in databases was opened recently, still do not quite understand how to make clean requests all the standard occasions.

Which one would You chose? Maybe there are some 4, 5...n solution?..
April 7th 20 at 10:58
1 answer
April 7th 20 at 11:00
If you are going to associate data between clients, display the average temperature in the hospital, for example, the database you do not need.
You need to keep a history of changes of certain parameters in the client file.
in what file, if your master database in sql?..
or do You mean saving to json all together?..
probably some statistics along the way we will need some kind of progress, etc. - crystal_Fahey45 commented on April 7th 20 at 11:03

Find more questions by tags MySQLDatabase design