5 ms·
> In EdgeQL every value is a set This is trouble for the example for calculating the average number of reviews across movies: SELECT math::mean( Mov
by talaketu 6y ago
> In EdgeQL every value is a set
This is trouble for the example for calculating the average number of reviews across movies:
SELECT math::mean(
Movie {
description,
number_of_reviews := count(.reviews)
}.number_of_reviews
);
Never mind, they are not sets:
> Strictly speaking, EdgeQL sets are multisets, as they do not require the elements to be unique.
The relational model is firmly based on the idea of a relation as a "set of tuples", and a major criticism of SQL has been that it views data as an ordered sequence of tuples.
So I'm skeptical of the claim that EdgeQL is really based on the relational model.
(Not clear whether multisets are ordered - wondering about window functions etc...)
- RedCrowbar 6y agoBoth EdgeQL and SQL disregard the RM proscription about duplicate tuples for practical reasons: 1. Elimination of duplicates from every projection is prohibitively expensive. 2. Sometimes you actually _want_ duplicates to show up without injecting a synthetic key into every projection. 3. There's DISTINCT.