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

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Fri, 08 Oct 2010 18:01:35 -0300
Message-ID: <4caf8687$0$14805$9a566e8b_at_news.aliant.net>


Cimode wrote:

> On 8 oct, 15:44, 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?
>>
>>Regards.
> 
> Rephrase your query in plain word english and you will find the answer
> is obvious.

Ironically, the query is in plain english. So plain, in fact, it sounds a lot like an exam question.

Then again, the source IP does trace back to Nigeria. Nigerian scammer looking to upgrade his skills, maybe? Received on Fri Oct 08 2010 - 23:01:35 CEST

Original text of this message