You are addressing a couple of issues here:
1) Performance: is inserting 100-150 records per minute for 20 fuel cells going to perform OK? That is, a maximum of 150*20 = 3000 records per minute, or 50 per second. Well, obviously performance depends on the particular DBMS, hardware etc. But 50 records per second doesn't sound excessive.
2) Uniqueness: with the second design, the unique key to a record will be (time, data) so uniqueness is preserved.
What you don't appear to be addressing is the
usability of this data. I don't know how you intend to use the data, but in general it is much easier to work with the second table design than the first with queries like:
- what was the average data value for fuel cell X between 10:00 and 12:00 today: "SUM(value)" is easier than "SUM(value1+value2+...+value150)"
- how often did the value exceed 42: "value > 42" is easier than "value1 > 42 or ... or value150 > 42".
Only if you never have to query "across" those 150 columns is the first table design perhaps OK.
Also I would not like to be considering doing ALTER TABLE at run time!
In fact, I would probably want to go for a single table to capture the data for ALL fuel cells:
+------+-------+-------+--------+
+ Cell | Time | Data | Value |
+------+-------+-------+--------+
Cell1 Feb 1 Data1 12.12
Cell1 Feb 1 Data2 23.41
...