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

From: Tegiri Nenashi <tegirinenashi_at_gmail.com>
Date: Wed, 20 Oct 2010 11:21:51 -0700 (PDT)
Message-ID: <857555ad-c7c0-4941-bb61-20560679501f_at_f16g2000prj.googlegroups.com>


On Oct 8, 5:44 am, Seun Osewa <seun.os..._at_gmail.com> wrote:
> Hi,
>
> It's commonly understood that in the relational model:
>
>    1. Every relational operation should yield a relation.
>    2. Relations, being sets, cannot contain duplicate rows.
>
> Imagine a 'USERS' relation that contains the following data.
>
> ID FIRST_NAME LAST_NAME
>  1 Mark       Stone
>  2 Jane       Stone
>  3 Michael    Stone
>
> If someone runs the query "select LAST_NAME from USERS", a typical
> database will return:
>
> LAST_NAME
> Stone
> Stone
> Stone
>
> Since this is not a relation - because it contains duplicate rows -
> what should an ideal RDBMS return?

Let me rephrase your question a little bit. What are the roots of cubic equation

x^3 = 9x

? I'd suggest it's

{0,3,3} Received on Wed Oct 20 2010 - 20:21:51 CEST

Original text of this message