Re: [PHP-DB] How many rows for 100 questions?
indexes should, on average, be applied to any column(s) that are in a where clause, multi-column indexes are acceptable bastien From: "...helmut" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: Re: [PHP-DB] How many rows for 100 questions? Date: Tue, 31 May 2005 15:38:31 -0500 THank you for ya'lls feedback, one more question in regards to ID's, Primary Keys and indexing. Lets say that in the future the admin wants to list all the records for answer 50, now, if I have my user ID as the primary key, do I have to index all my answers so they are easy to search? or it doesnt really matter? Thanks! -- ...helmut helmutgranda.com ""Andrés G. Montañez"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >I have a questionary that has 100 questions, > > > >Should I create 2 tables 1 with the user information and the second one > >with > >the 100 questions? What is your recommendation? I recommend you the next table configuration: 1 table for users 1 table for the questions (so you can have more than 100) IF the User can Input the Answer -> 1 table with User ID, Questin ID and the Answer IF the User only selects a pre-defined Answer -> 1 table Answer ID, Questin ID, Answer 1 table User ID, Questin ID, Answer ID IF the User can select a pre-defined answer OR input, a MIX of both solutions. -- Atte, Andrés G. Montañez Técnico en Redes y Telecomunicaciones Montevideo - Uruguay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] How many rows for 100 questions?
THank you for ya'lls feedback, one more question in regards to ID's, Primary Keys and indexing. Lets say that in the future the admin wants to list all the records for answer 50, now, if I have my user ID as the primary key, do I have to index all my answers so they are easy to search? or it doesnt really matter? Thanks! -- ...helmut helmutgranda.com ""Andrés G. Montañez"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >I have a questionary that has 100 questions, > > > >Should I create 2 tables 1 with the user information and the second one > >with > >the 100 questions? What is your recommendation? I recommend you the next table configuration: 1 table for users 1 table for the questions (so you can have more than 100) IF the User can Input the Answer -> 1 table with User ID, Questin ID and the Answer IF the User only selects a pre-defined Answer -> 1 table Answer ID, Questin ID, Answer 1 table User ID, Questin ID, Answer ID IF the User can select a pre-defined answer OR input, a MIX of both solutions. -- Atte, Andrés G. Montañez Técnico en Redes y Telecomunicaciones Montevideo - Uruguay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] How many rows for 100 questions?
> >I have a questionary that has 100 questions, > > > >Should I create 2 tables 1 with the user information and the second one > >with > >the 100 questions? What is your recommendation? I recommend you the next table configuration: 1 table for users 1 table for the questions (so you can have more than 100) IF the User can Input the Answer -> 1 table with User ID, Questin ID and the Answer IF the User only selects a pre-defined Answer -> 1 table Answer ID, Questin ID, Answer 1 table User ID, Questin ID, Answer ID IF the User can select a pre-defined answer OR input, a MIX of both solutions. -- Atte, Andrés G. Montañez Técnico en Redes y Telecomunicaciones Montevideo - Uruguay -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] How many rows for 100 questions?
one table for users one table for questions and possible answers one table for what the user fills out in his questionaire Bastien From: "...helmut" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] How many rows for 100 questions? Date: Sat, 28 May 2005 12:19:02 -0500 I have a questionary that has 100 questions, Should I create 2 tables 1 with the user information and the second one with the 100 questions? What is your recommendation? Links to tutorials or information are welcome. TIA -- ...helmut helmutgranda.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php