Re: Can relational alegbra perform bulk operations?
Date: Tue, 29 Sep 2009 12:50:24 -0700
Tegiri Nenashi wrote:
> This is not really the case. All these transformations are ad-hock. If
> you try proving, say, "pushing selection through projection" you would
> get bogged in set notation with awkward attribute indexing, and even
> if succeed actually proving it, it would hardly result in any
I suppose it's true that we can transform an expression into anything else and could conceivably add as many zeros for additive/subtractive operations or ones for multiplication/division operations and still have logically equivalent expressions, but such expansion would hardly be interesting in absence of further transformation.
Even so, wouldn't it be fair to say that in order to optimize any given query upon relation, we would want to find the most simple (or maybe it's accurate to say 'concise') expression that is computationally simple to execute compared to other but equivalent expressions?
> It is too vague. Algebras, in general, don't care about the structure
> of their elements; relational algebra, in particular, doesn't refer to
Then I obviously don't have a full understanding of the theory as I would like to think.
However, could I ask you to explain the statement that tuples aren't referred at all in relational algebra?
My objective is to understand whether operators exists that enables us to perform evaluations on a set of propositions as whole rather than having to verify each proposition.
Back to the r and s example, if I were to join them based on an attribute x, I would have to look at all possible values in attribute x of the relvar r then go to s and look up each tuples in relvar s and verify whether its attribute x has the same value and thus 'select' the tuple into the resultant output. I've just described an iterative manner of evaluating what tuples may participate in a join and that's precisely concerns me; was that actually necessary or does there exist an operator to process them in bulk?
Or maybe to attempt an analogy, when we multiply two numbers, we need not add each number to itself as many times as specified by other operand. It's valid but not the only way to determine the product; we certainly can determine product by recalling the product from multiplication table and even for an arbitrarily large operands, use the same algorithm to quickly arrive at a product.. Does such concept exist for operating upon relations in like manner?
I do apologize in advance if I'm being vague or imprecise; as I said I'm quite new and trying to grasp the pictures, though I must admit that I'm also looking at the whole thing through the lens of practicality; how does it help us and how much can it help us? It obviously helps on providing logical design, but I'm looking at the optimizations that it may have to offer to whatever implementation.
Again, thank you. Received on Tue Sep 29 2009 - 14:50:24 CDT