Save a JSON to the database or create an intermediate table?

Asked

Viewed 226 times

0

Good night!

I am in a small Dilemma, I am building an application to control events,in this application I have an event that can have several guests in the Front end I am thinking of using a component equal to this: inserir a descrição da imagem aqui

Anyway, what would be the best way to save that in the bank? I create an intermediate table called "guests" pointing to the user and event ID or create a JSON field in the table guarding the guests?

inserir a descrição da imagem aqui

  • I believe the field would be better because it would improve performance, imagine this new table with thousands and thousands of records...

  • The best option is to always normalize the database structure. If you have a table of Scheduling and another with Users, the best will even be to create a new table with the ID of both and store the information you find necessary (in this case JSON).

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.