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

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Thu, 13 Feb 2003 12:07:02 -0800
Message-ID: <2%S2a.9\$O%2.39_at_news.oracle.com>

Suppose we have a set {0,1}. Let's move the "second" set member a little bit: {0,1/2}. So far so good, the set still has 2 elements. Let's move it one more time: {0,1/4}. We still have set cardinality 2. In the limit, however, we have the set with only one element {0}. This change of cardinality is very nasty from math perspective, because it presents a break of continuity. This is why matematians would consider the limit to be multiset {0,0} rather than just a set {0}. Mathematical definitions do contain multiset concept explicitly within their definitions, for example, "a spectrum is a *multiset* of eigenvalues". Break of continuity manifests itself in relational theory as a change of row set cardinaly after projection is applied. On the contrary, in multiset model, projection doesn't change number of rows. (Selection -- being dual to projection -- doesn't change number of columns in both set and bag models).

> >
> >
> >Well, I think that even for end results duplicates can be useful.
> >It is the difference between the set theory and query results in
practice.
> >For instance: a set doesn't have an order but it would be impossible to
present
> >results to a user of our database if we cannot order the end result.
> >
>
> I agree that ordering is needed to present data and that a "set" such
> ordered rows are not
> relations anymore.
>
> >To give an example of the use of duplicates:
> >Suupose we have a table that holds text (letters for instance).
> >We would probably have a line number field and a text field.
> >To improve readability we will have several occurrences of blank lines.
> >If we then select the text column ordered by the line number, we will
have
> >(meaningful) duplicates in the end result.
> >
>
> However, you would include the line number column to get the rows
> in the correct order. You would just disregard the column in your program
> or report generator.
>
> So the end result of the query would _not_ have duplicates!
>
> regards,
> Lauri Pietarinen
>
Received on Thu Feb 13 2003 - 21:07:02 CET

Original text of this message