Table structure needed

Hi folks

I need to create a "training database". The idea is to track all the trainings a workers has participated. So I created a table for the workers (basically with field id and name) and one for the trainings (id, title decription).

Now the question: How shall I assign the workers to the trainings? For each training there will be multiple workers that participated. Can I add them to a field of the corresponding trainingstable entry or do I need to dynamically create participants tables with one participants field?

BR rogi

As far as setting up the many-to-many relationship using has_and_belongs_to_many, this is pretty well covered in the Rails guide on Active Record associations ( and the API documentation ( I think this answers your question, but repost if not.