Re: Complicated query

From: Denis McMahon <denismfmcmahon_at_gmail.com>
Date: Mon, 15 Dec 2014 15:47:15 +0000 (UTC)
Message-ID: <m6mvq3$lfq$1_at_dont-email.me>


On Mon, 15 Dec 2014 08:16:59 -0500, Jerry Stuckle wrote:

> On 12/15/2014 1:10 AM, Denis McMahon wrote:

>> If in the OPs case the answers are actually a mix of strings, dates,
>> numbers and booleans, then I guess this coercion has already been done,
>> given that the Op was presenting us with a single table of answers, but
>> again, there may be cases where having all the answers to a single set
>> of questions in a single record might not violate normal forms, which
>> is where I'm going with this.

> I don't see where this does not violate first normal form. You would > have multiple columns in the same domain.

It depends on what the questions are and what the collective group of answers to the question set represents.

eg (my first example):

title?
firstname?
lastname?
dateOfBirth?

That's part of a person record, and I doubt many people would consider the table:

create table person (title varchar(10), firstname varchar(20), lastname varchar(20), dateOfBirth date);

to violate first normal form.

Do we debate whether firstname and lastname are in the same domain now? ;)

-- 
Denis McMahon, denismfmcmahon_at_gmail.com
Received on Mon Dec 15 2014 - 16:47:15 CET

Original text of this message