Database structure for a large amount of data with different types Can I ask you for give me tips how to design efficient database to store large amounts of data with different types. I would like to use SQL Server 2016 as the database management system. 

I have to store device id (int), timestamp and value itself. Value could be bit, int, float or even string. It's SCADA application so I have to store parameters like speed, temperature, status, product name, etc... 

The end users select data portions without doing math on server side - so it's simply select by id and timestamp. 

My questions are: how to design the relevant tables and what datatypes should I use to make it work as efficiently as possible?

Current options

My idea is to keep it in one table with values as VARBINARY. I use Entity Framework Core 2, since I am familiar with it, but maybe you can suggest me a better approach.
You didn't mention whether your parameters are dynamic and variable.  If not then the correct logical design is:

(id,ts,speed,temp,pressure,status)


And the correct physical design is a clustered columnstore with a non-clustered primary key on (id,ts).  Possibly partitioned by id or ts into ranges.

If your parameters are variable, you should consider using JSON over using a Key-value-pair across multiple rows.

(id,ts,telemetry_json)


or

(id,ts,telemetry_json_gzip)


With the telemetry data stored in JSON key-value pairs, and/or JSON arrays.  Not only is this model efficient and handy, you can use a Value Conversion in EF Core to have a complex .NET type serialized to/from JSON for storage in the database.

You can use

(id,ts,attribute,value)


but this pattern is generally not the most efficient, or convenient, and is widely frowned-upon.  There many discussions on this site and others regarding the Entity-Attribute-Value model.