Related tangent: databases should track units. If I have a time column, I should be able to say a column represents, say, durations in float64 seconds. Then I should be able to write<p><pre><code> SELECT * FROM my_table WHERE duration_s >= 2h
</code></pre>
and have the database DWIM, converting "2h" to 7200.0 seconds and comparing like-for-like during the table scan.<p>Years ago, I wrote a special-purpose SQL database that had this kind of native unit handling, but I've seen nothing before or since, and it seems like a gap in the UI ecosystem.<p>And it shouldn't be for time. We should have the whole inventory of units --- mass, volume, information, temperature, and so on. Why not? We can also teach the database to reject mathematical nonsense, e.g.<p><pre><code> SELECT 2h + 15kg -- type error!
</code></pre>
Doing so would go a long way towards catching analysis errors early.