Re: Complicated query

From: Shelly <sheldonlg_at_thevillages.net>
Date: Thu, 11 Dec 2014 12:33:40 -0500
Message-ID: <m6ckh2$jd8$1_at_dont-email.me>


On 12/9/2014 7:15 PM, Denis McMahon wrote:
> On Mon, 08 Dec 2014 22:00:57 -0500, Shelly wrote:
>
>> On 12/7/2014 12:05 PM, richard wrote:
>
>>> I know this will piss off normalized Jerry Stuckle, but I'd just as
>>> soon use one table.
>>> Columns would be ID Question Achoice Bchoice Cchoice Dchoice Correct
>>>
>>> Now all you need to do is retrieve the row for each ID as needed.
>
>> Of course, and if *I* had designed the table structures, that is what I
>> would have done as well.
>
> You are kidding us, right?
>
> Are you seriously working with Oracle products and preaching non
> normalised database design?

How is this non-normalized? You would label each of the answer fields with a unique name that illustrates the question to which it is an answer. You would then eliminate the question table entirely, unless you want to keep it with both the expanded question and the name of the field in the instance table for which it corresponds. In that table, the name would then be the foreign key. Since this only is to be used is designing the html user interface, it is really not needed as you could simply add the text explicitly. Thus you are down to only one table that is needed -- the instance table -- with n unique fields.

So, pray tell, how is that non-normalized? Where is the redundancy? To what other tables need something here be propagated (none!).

No, sir, it is not non-normalized. The "normalization" that exists now is an unnecessary complication.

>
> Also you seem to have lost the instance information somewhere along the
> way. Hope that wasn't important.

He was giving a short-hand. He *obviously* meant

ID Instance-item-1 Instance-Item-2 (etc.) Question Achoice Bchoice Cchoice Dchoice (etc.)

Apparently that was beyond your grasp.

-- 
Shelly
Received on Thu Dec 11 2014 - 18:33:40 CET

Original text of this message