| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Real world issue: How to "split" queries in presence of record replication and replication sensitive aggregate functions ?
Marshall wrote:
> pamelafluente_at_libero.it wrote:
>
>>[records are unimportant. In any case, in practice there can be >>transactions where one buys the same item and spend the same money.
>>Here it "seems" record are equal because field key for trans are >>missing. But that's irrelevant to our purpose. I wanted to avoid >>discussion about contents because really immaterial here]
>>>So your question is how to handle the repetition of >>>values from TRANS when aggregating over a column >>>in TRANS with a non-idempotent aggregate? >> >>The duplication I am talking about is the one caused by joining tables >>in 1-N relationship.
>>When you make the join ONE-TRANS-SUBTRANS the >>values in TRANS are replicated due to the relationship 1-N with >>SUBTRANS . So (non idempotent) functions computed on TRANS consider the >>same values more times they should (duplicated values).
>>This yeld a wrong result in the report for these functions.
>>Smart software is perfectly capable to split this query in subqueries, >>as also Alexander pointed out in the previous post.
>>My original question was: >> >> 1. how is this problem called in the theory (are there references to >>study?)
>> 2. what is the algorithm to do that (or is it some kind of industry >>secret that only few leader softwares implements?)
>>>What is wrong with "don't do that" as the answer? >> >> That's not allowed :)) (It's allowed to have an algorithm that warn >>the user about some possible problem in the design)
In other words, no matter how proud Pamela is of her ignorance, the primary role of a dbms is not to compensate for ignorance. The primary role of a dbms is to manage data as instructed.
It's obvious to any reasonably intelligent person that if one doesn't want the effects of a join, one doesn't do a join. Likewise, if one doesn't want the effects of a restrict, one doesn't do a restrict. etc. I fact, I would expect it to seem rather obvious even to people of rather modest intelligence.
Does anyone remember the "I hate it when I do that" sketches from SNL? Received on Sun Sep 17 2006 - 12:20:55 CDT
![]() |
![]() |