I want to store dynamic statistical data in a NoSQL way - a structured document and be able to work on a parameter basis.
e.g.
{
'client': 1245,
'amount': 25425,
'create_date': '2019-01-01'
}
As I understand, MariaDB has two different approaches since version 10.2:
- using BLOB column data type and dynamic column functions COLUMN_CREATE, COLUMN_GET, COLUMN_LIST, ...
- using VARCHAR column and JSON specific functions JSON_EXISTS, JSON_QUERY, ...
I see some pros and cons in both ways:
- Dynamic columns
- pros
- seems faster
- cons
- less universal
- less standard
- suited more for one depth of parameters
- pros
- JSON
- pros
- better in complex structure
- more standard when exporting
- easier data creation
- cons
- seems slower and less robust
- pros
I also feel the development of the JSON approach is more active in recent years.
Since I need to decide which way to go for the next couple of years and I haven't found any comparison of the approaches can someone shed some light on this topic?