Re: The Relational Model & Queries That Naturally Return Duplicate Rows

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Tue, 19 Oct 2010 16:30:35 -0700 (PDT)
Message-ID: <0075c299-39ff-4f43-86bb-0477ca735451_at_l20g2000yqm.googlegroups.com>


On Oct 20, 2:21 am, Sampo Syreeni <de..._at_iki.fi> wrote:

> If you want duplicates, just count them
> explicitly. In Codd's language, explicitly cause the resulting
> relation to be "framed", as in:
>
> LAST_NAME, COUNT
> Stone, 3

In case you wonder, this is not possible in the general setting using just relational algebra/calculus. Those are about first order predicate logic which cannot do this sort of thing. That is then a reasoned choice by the early relational pioneers; they externalized arithmetic axioms from the basic relational algebra to make it more manageable.

That doesn't mean you can't build such operations into your query language at a higher level. Even Codd called for aggregate and algebraic operations within a single domain. Especially in his OLAP work. But that sort of thing is mostly orthogonal to the basic relational model, and a necessary, or even a wanted, part of it. Received on Wed Oct 20 2010 - 01:30:35 CEST

Original text of this message