Pete Wilson wrote:
Break them out into a separate table linked via the primary
key.
How elegant! Thanks.
-- Pete
it's nothing not taught in Database Design 101. Typically you would
have a setup like this
USERS
USER_ID <--primary key
USER_NAME
USER_IP
ASSOC_NUMBERS
A_ID <--primary key
USER_ID <-- foreign key linked to users
A_NUMBER <---one of the integers that you would store
Alternatively, you can skip the A_ID and have a compound key of USER_ID
and A_NUMBER on the ASSOC_NUMBERS table. I prefer the A_ID, though.
Another way I've read about (though I can't remember the article) is
that certain types of databases do allow you to store an array. These
are normally used for databases that need to be very, very small (like
on an embedded chip). However, the way I described is usually the
default for relational databases.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org