dbTalk Databases Forums  

Survey with many columns

comp.databases.theory comp.databases.theory


Discuss Survey with many columns in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Philipp Lenssen
 
Posts: n/a

Default Survey with many columns - 08-15-2003 , 11:16 AM






My colleague is working on a project which should store data from a long
survey. His single table now has many, many columns (labelled "a_1_1"
and so on), with different data types (some boolean, some integers, some
text, and so on).

Is there a way to optimize this?
E.g. what would be if the next survey comes along, one which has
different fields. Would everything need to be redone from scratch?

Reply With Quote
  #2  
Old   
Leandro Guimarães Faria Corsetti Dutra
 
Posts: n/a

Default Re: Survey with many columns - 08-16-2003 , 12:19 PM






Em Fri, 15 Aug 2003 18:16:14 +0200, Philipp Lenssen escreveu:

Quote:
working on a project which should store data from a long
survey. His single table now has many, many columns (labelled "a_1_1"
and so on), with different data types (some boolean, some integers, some
text, and so on).

Is there a way to optimize this?
Presumably the survey is a consolidation of assorted
information about many different entities. One should determine the
entities, model the database and normalise it. One will probably end
up with many different relations, and no NULLs -- probably special
values, but no NULLs.


Quote:
E.g. what would be if the next survey comes along, one which has
different fields.
Depends.

If one insists on treating the survey as one entity, the next
different survey is obviously another entity, and thus another
relation.

If one has modeled the database according to perceived
entities and normalised it, the next survey will be a simple addition
of the new entities and attributes, as new relations and perhaps new
attributes in old relations. One might even come to create views to
preserve the old logical model without using neither NULLs nor default
values without a meaning...

Suggestion: grok the relational model by reading Date.


--
_ Leandro Guimarães Faria Corsetti Dutra +41 (21) 648 11 34
/ \ http://br.geocities.com./lgcdutra/ +41 (78) 778 11 34
\ / Responda Ã* lista, não a mim diretamente! +55 (11) 5686 2219
/ \ Dê nota se ajudei: http://svcs.affero.net/rm.php?r=leandro



Reply With Quote
  #3  
Old   
me
 
Posts: n/a

Default Re: Survey with many columns - 08-20-2003 , 05:11 PM



You should make a generic data structure for surveys.

That way you can always create surveys without changing your table
structure.

I've done this a few times with great success.




"Philipp Lenssen" <philipp.lenssen (AT) bb-k (DOT) com> wrote

Quote:
My colleague is working on a project which should store data from a long
survey. His single table now has many, many columns (labelled "a_1_1"
and so on), with different data types (some boolean, some integers, some
text, and so on).

Is there a way to optimize this?
E.g. what would be if the next survey comes along, one which has
different fields. Would everything need to be redone from scratch?



Reply With Quote
  #4  
Old   
askot@ut.ee
 
Posts: n/a

Default Re: Survey with many columns - 08-22-2003 , 11:38 AM



Quote:
You should make a generic data structure for surveys.
How about generic data structures for surveys and data analysis,
ie correlation between two variables/questions?


Asko...



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.