Settings

Theme

A Query Language Is Also a Data Constraint Language

nchammas.com

24 points by nchammas 4 years ago · 1 comment

Reader

contravariant 4 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection