Re: Define "flatten database" ?
Date: Fri, 28 Jan 2005 09:55:28 -0600
Message-ID: <ctdn9o$7sq$1_at_news.netins.net>
"DA Morgan" <damorgan_at_x.washington.edu> wrote in message
news:1106859773.807419_at_yasure...
> silversw2000_at_yahoo.com wrote:
>
>> I had a database analyst interview yesterday on the phone, and the
>> interviewer brought up the phrase: "I flattened the database".
>>
>> I did not obfuscate in replying to her thread, but was able to avoid
>> having to know what she meant by that term.
>>
>> Can someone define "flatten database" for me, in 100 words or less (OK
>> 500 words is fine).
>>
>> Fred Z.
>>
>
> Denormalize.
I would guess "normalize" is more likely. If the source dbms permits
non-1NF structures, then the term "flatten" is sometimes used to mean that
the data are put in1NF. Terms I might use as synonyms to "flatten" are
"unnest", "explode", "normalize". It isn't quite the same as normalizing,
however, because the embedded lists are not placed in a separate relation,
but rather the "scalar" data are repeated in each row, while the list has
one value per row. Reasons to flatten the structure would include a need to
use a SQL-92-based tool or pour the data into a single Excel worksheet.
If the source dbms is a SQL-based product, then the user might still be
dumping tag-delimited lists in as attribute values (we all know there are
people who do that, right?) or even using some non-1NF capabilities of the
particular RDBMS.
Example:
Start with:
(12345,DeSmith,John,{jsmith_at_aol.com,JohnSmith_at_yahoo.com})
(23127,Meador,Beth,{beth_meador_at_msn.com,bmeador_at_hotmail.com,btm_at_ibm.org})
Then flatten it to get:
That's my best guess. --dawn
> --
(12345,DeSmith,John,jsmith_at_aol.com)
(12345,DeSmith,John,JohnSmith_at_yahoo.com)
(23127,Meador,Beth,beth_meador_at_msn.com)
(23127,Meador,Beth,bmeador_at_hotmail.com)
(23127,Meador,Beth,btm_at_ibm.org)
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu
> (replace 'x' with 'u' to respond)
Received on Fri Jan 28 2005 - 16:55:28 CET
