I have two different types of objects, let’s say event and person. Each person can attend multiple events. I want to have two tables
event
- id [int (4),primary]
- name [varchar (30)]
- …
person
- id [int (4),primary]
- name [varchar (30)]
- mail [varchar (60),unique]
- attends [Array of events.id]
Therefore, the field person.attends
should be an array of integers of length 4 and I want to tell MySQL that each value in this array is a foreign key from event.id
. Is there any way to do this?