I think "Preferences" may be a child table which has all users preferences :
Preference
============
PREFERENCE (integer unsigned not null primary key auto_increment)
SUBJECT (char(20) not null)
USERCHOICE (set {"choice1","choice2",..."choiceN"} not null)
USERID (foreign key, use the definition from user's table )
This way you can store all user's preferences .
$query = "select USERCHOICE from Preference where USERID = $user" ;
This query gets the preferences from a defined user.
HTH.
Jayme.
http://www.conex.com.br/jjeffman
-----Mensagem Original-----
De: Darryl Friesen <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: sexta-feira, 19 de janeiro de 2001 19:27
Assunto: Re: [PHP-DB] Child tables in MySQL
>
>
> > How about creating a separate table for each user and a column in the
> > main table pointing to these user preference tables
>
> I missed the first part of this thread, so forgive me if I'm missing
> something, but that seems like a very bad idea.
>
> What if 10,000 people sign up (for whatever this service is)? Do you
really
> want 10,000 tables in your database? Is it not possible to have a single
> table for users (one row per user) with preferences in that same table
> (perhaps encoded somehow to save space)? Or a table for users, one for
the
> different preference options, and third to join them?
>
>
> - Darryl
>
> ----------------------------------------------------------------------
> Darryl Friesen, B.Sc., Programmer/Analyst [EMAIL PROTECTED]
> Education & Research Technology Services, http://gollum.usask.ca/
> Department of Computing Services,
> University of Saskatchewan
> ----------------------------------------------------------------------
> "Go not to the Elves for counsel, for they will say both no and yes"
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]