How to store a set of values from another table in a field in MySQL -
i'm running on version of mysql not back upwards foreign key relationships.
suppose have 2 tables, 1 holds number of users while other 1 holds number of topics. want each of topics have field holds set of user id's participated in topic. read type set's documentation , says must values predefined values. how should go doing this?
you don't want field, inefficient way of storing such things. want new table.
in 3rd table (called, say, topicusers
). have 2 fields: userid
, topicid
. can @ table , join
info others needed.
this called normalisation
mysql set
No comments:
Post a Comment