3 ms·
I agree with all you said, except this one: > they violate the commutative, associative and distributive laws of the relational algebra I follow the idea of r
by mamcx 8y ago
I agree with all you said, except this one:
> they violate the commutative, associative and distributive laws of the relational algebra
I follow the idea of relational set, but implementing a relational language (http://tablam.org http://tablam.org, alpha btw) I see why bags surely are better. Is not a mistake rdbms take it. Make everything sets demand more memory and runtime costs. You need to couple a index or pay O(N) for each mutation and get only a few upsides.
If exist a way around this, truly I wanna know.
However, exist another reason for what sets are wrong (as being default) them fail to cover the most simple and yet more powerful capability of the relational model: Model data.
Is posible to argue than [a, 1; b, 1] must be a set and order not mater. But [a, 1] & [b, 1] are both relations, right? also are [a, b] & [1, 1]. Is wrong to make [1, 1] to [1] just to get a math purity.[1, 1] is valid. Say that duplicates are wrong is non-sense. Also say that "order not matter" is non-sense too.
Ironically, the solution for this? add another column just to keep thins as set.