0
I have a database in Mysql where, as the project is being developed, the number of fields of some tables has grown exponentially.
The People table, for example, has fields relating to personal documents, home address, work address, personal data, academic data, etc.
'empresa' =>
array (size=6)
'nome' => string 'Empresa Legal' (length=13)
'funcao' => string '' (length=0)
'rendimento' => string '' (length=0)
'endereco' =>
array (size=7)
'cep' => string '' (length=0)
'logradouro' => string '' (length=0)
'numero' => string '' (length=0)
'complemento' => string '' (length=0)
'bairro' => string '' (length=0)
'cidade' => string '' (length=0)
'estado' => string '' (length=0)
'telefone' =>
array (size=2)
'fixo' => string '' (length=0)
'movel' => string '' (length=0)
'email' => string '' (length=0)
I had thought of grouping the data in Json and storing each group in a specific field but I’m not sure if this is good practice or if it affects the performance of the database.
My question is essentially about best practices regarding data storage, because I can handle JSON if problems.
If this is not the best way, I accept suggestions to structure this data.