Re: Question about a data structure
- From: Geoff Berrow <blthecat@xxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 08:48:17 +0000
Message-ID: <45be9980$0$28162$4c368faf@xxxxxxxxxxxxxx> from Larry in
Honolulu contained the following:
Well I appreciate the answer, and that sounds fine, except with just 1000
entries, that's 150,000 records, and thinking about writing the queries to get
the data out and use it makes my head hurt!
150,000 is still peanuts.
Lets say you have something like this:
answer_id (PK), user_id, question_id, response
Then put users details in a separate table. Questions would also be in
a separate table
question_id(PK), survey_id, question
Getting the answers for a particular user is easy
To get responses you'd have to query the questions table to get all the
questions in an array then loop through this array to get the responses
to the questions.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
.
- References:
- Question about a data structure
- From: Larry in Honolulu
- Re: Question about a data structure
- From: Michael Fesser
- Re: Question about a data structure
- From: Larry in Honolulu
- Question about a data structure
- Prev by Date: for logan: pleasant newsgroup access - uk - (1/1)
- Next by Date: Re: Regular Expression Query
- Previous by thread: Re: Question about a data structure
- Next by thread: Re: Question about a data structure
- Index(es):
Relevant Pages
|