Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?

From: Mikito Harakiri <>
Date: Fri, 14 Feb 2003 11:38:35 -0800
Message-ID: <nGb3a.11$>

"Paul" <> wrote in message
> What's the interpretation given to a table with duplicate rows?
> In relational theory, each relation corresponds to a logical predicate
> e.g. the employee table has a truth-valued function f(emp, dept,
> salary) say.
> and each row in the relation corresponds to the proposition obtained
> by substituting actual values for the placeholders emp, dept, salary.
> e.g. f("J Smith", 10, 20,000) means J Smith is in dept 10 and has a
> salary of 20,000.

Interpretation is not always the driving force of the theory. Widely successful theory can have poor interpretation. Quantum Mechanics Copenhagen Interpretation, for example, has some conflicts with "common sence".

> So with this interpretation duplicate rows don't make sense because
> you're just making the same assertion more then once, which doesn't
> make it any more true.
> So is "multi-set" relational algebra not based on predicate logic?


> Also, there's no way for users to identify a row because the thing
> that differentiates them is held internally and is thus invisible to
> the user - and this breaks the logical/physical distinction.

This is a subtle issue. For example, a number 12 is 10^1*1+2*10^0. Any numerical value can be thought as an aggregate of its base coefficients. We could even store it in the database in dismembered state

table Item (

    name string,
    count_in_1s integer,
    count_in_10s integer,

(but for practical reasons we don't). Is this representation breaking logical/physical distinction?

Now, in base-1 system the same number is 1+1+1+1+1+1+1+1+1+1+1+1. Multiset Representation is just dismembering numbers in base-1 system and pivoting the result so that we have multiple rows instead of multiple columns.

> You can always get the same duplicate row functionality in true
> relational algebra by adding another column which contains the "count"
> for the rest of the attributes.

Adding count column is certainly possible, as Bob demonstrated it yet one more time. I'm just verifying if this practice is not inferior to explicitly having multiset concept in the model.

> If multi-set algebra is used maybe it should always be internal (i.e.
> part of the physical implementation) and hidden from the user?

What is this logical/physical distinction? I want a declarative computational model that supports aggregation, ordering and transitive closure in addition to the other usual things: projection, restriction, cartesian product, etc. It would allow me much more than current Relational Model offers.

I'm not claiming that multisets are superior to sets. There seems to be some some cases where they do, and I want to see the whole picture.

Given that multiset is essentially a mapping of a rows to nonnegative integers, wouldn't it be more advantageous to generalize it to mapping of a rows to reals? Received on Fri Feb 14 2003 - 20:38:35 CET

Original text of this message