[HN Gopher] A Query Language Is Also a Data Constraint Language
___________________________________________________________________
A Query Language Is Also a Data Constraint Language
Author : nchammas
Score : 13 points
Date : 2021-10-31 16:27 UTC (6 hours ago)
(HTM) web link (nchammas.com)
(TXT) w3m dump (nchammas.com)
| contravariant wrote:
| Mathematically it's somewhat obvious that constraining the set of
| allowed relations is equivalent to defining a function from a
| relation to {true,false}. So I suppose it isn't too surprising
| that queries are equivalent to constraints.
|
| That said for this most general definition for a relation over
| set X1, X2, ..., Xn the number of relations is 2^(X1 X2 ... Xn)
| so the number of constraints is even more ridiculous and would
| require at least 2^(X1 X2 ... Xn) bits to just enumerate them
| all, so it's pretty obvious that there can only be a small subset
| of constraints that can be represented efficiently.
___________________________________________________________________
(page generated 2021-10-31 23:01 UTC)