Re: The Relational Model & Queries That Naturally Return Duplicate Rows
From: Sampo Syreeni <decoy_at_iki.fi>
Date: Tue, 19 Oct 2010 16:21:27 -0700 (PDT)
Message-ID: <fe498b14-4863-480d-bec5-3299642716a6_at_j25g2000yqa.googlegroups.com>
Date: Tue, 19 Oct 2010 16:21:27 -0700 (PDT)
Message-ID: <fe498b14-4863-480d-bec5-3299642716a6_at_j25g2000yqa.googlegroups.com>
> 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?
LAST_NAME
Stone
No duplicates. Simple as that. 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
Received on Wed Oct 20 2010 - 01:21:27 CEST