The next question primarily concerns the approaches and methods in processing data of different types, and the second - the implementation of these actions in some tool or language, in my case I use python and relational database

There is an array of data of this type.

 obj\prop| property1 | property2 | property3 | property4 __________________________________________________________ id=1 | 3.4*10^3 m | 'CID23' | 3.4 W | 12.3 % id=2 | 5.4*10^16 m | 'AA323' | 223 W | 23 % id=3 | 235 m | 'dID23' | null | 0.0003 % id=4 | null | null | 222 W | 10^(-3) % id=5 | null | 'CID33' | null | null id=5 | 0.6 m | null | null | 12.3 % id=5 | 673 m | null | 234 W | 99.23423 % ... id=N | 5378 m | 'test234' | 3.4 W | 42.3 % null - отсутствие данных 

As can be seen the value of the properties can be represented:

  1. as string (as in property2 column): 'CID23', 'Silver', 'RandomString'
  2. integer number: 235, 0, -10000
  3. a number with a fractional part: 2.2, 0.234, -123.5
  4. number in the exponential notation: 3.4 * 10 ^ 3, 0.666 * 10 ^ 33, -3.213 * 10 ^ (- 84)
  5. missing: null

Items 2,3,4 can be combined into one - all numbers can be represented in the exponential system, forgive me mathematics, if I carry heresy.

Some properties have units of measurement (W, m,%, etc.).

The data type is not mixed inside the column - data can be either string + null or numbers + null, the same property cannot be described by string and number.

And actually a question. What model can describe all these properties?

If all the data were represented by numbers, I would consider their translation into an exponential notation (mantissa, base, degree) and create a model

  mantissa | base | significand | unit 

in which the data 3.4*10^34 m could be represented as

  mantissa | base | significand | unit 3.4 | 10 | 34 | m 

with string data is still easier, for example for 'CID23'

  value | unit CID23 | m 

However, in my case, I did not find anything better than how to combine these models into one, in which the "unnecessary" fields are zeroed out. For two examples, the table in the database looks like this

  mantissa | base | value | significand | unit 3.4 | 10 | null | 34 | m null | null | CID23 | null | null 

Is there some more elegant way to handle this type of data?

    0