Hi,
I have a architecture decision to make.
In my head I have two ideas on how to store settings/parameters in the database.
An example for one of those settings is a treshold in days for the next device maintenance.
I would like to access the settings with a helper class like so
Use a table which contains a key and a value field. The value field has the json type and is not nullable.
Use a table which contains a key and multiple columns for different datatypes which are automatically casted. As example for the columns: string_value and date_value. Those fields are nullable.
If I would use this approach I need to define somewhere which setting uses which datatype (a datatype mapping) or I could just specify the datatype in the call for the get method.
I've decided to use the second approach with multiple columns for different data types.
I followed @tray2 and @jlrdw recommendations to don't use json column for this type of problem.
Thank you for the help!