Subject Re: [firebird-support] Re: Update Table
Author Martijn Tonies
> > A> To me, it makes more sense to include a record for each answer,
> as
> > A> well as the answer given unless all questions are compulsory
> (where
> > A> you could save a bit of data storage).
> >
> > IMO the structure, or metadata, of a questionnaire should be stored
> > separately from the answers, or data, otherwise you end up wasting a
> > lot of space and, more importantly, duplicating information about
> how
> > a questionnaire is structured. Perform a left join between metadata
> > and data to get a NULL for a missing answer.
> >
> > To make an analogy, storing all 600 rows regardless would be kinda
> > like storing a table definition once for each record of the table.
> >
> > A> It may be important to distinguish between the questions that
> have
> > A> not been asked and the questions they answered no to.
> >
> > Of course. That's why I'd store the answer to each question
> > (yes/no or whatever); a missing row is an answer not given.
> >
> So we agree then. Storing only the yes in the table and assuming the
> others are no's is not usually a good way to go. I did suggest this
> exact thing to him in his follow up thread.

Well, I guess it depends on the requirements. The original posted
did not specify his requirements very well.

All I did was suggesting a way to store only "yes" answers in the most
effecient way :-)

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!