So the question what is better to use a linked tables vs json objects in a mysql database for many to many relationship so for example you have a user
table like this
id
name
email
and event
table:
id
name
description
The question is if its better to add a extra text field toward the user
table with text
column where you store a json object where you put event ids
in like this
user
table:
id
name
email
json
with the json object looking something like this
{
{event_id: 1},
{event_id: 2},
etc
}
or have a linked table with
id
event_id
user_id
assuming you have a many to many relationship where one user can register for multiple events and one event can have multiple users. where you also want to count how much users belong to 1 event and also wanna ask which one is optimal to use for querying and performances while doing this in laravel.