2

what is more efficient and more performance have array of objects or separate table

example

id 
date 
json (array of comments) 

or

separate comments into table it self

id 
user 
comment 
juergen d
  • 201,996
  • 37
  • 293
  • 362
Omar Omat
  • 21
  • 2
  • 1
    You can pack your entire data into a single JSON string. But if you want to build a relational database, every entity should have it's own table. – Paul Spiegel Dec 26 '19 at 13:04
  • will i gain any thing using the json method or it's better to use relational way – Omar Omat Dec 26 '19 at 13:09
  • 1
    See: [is-storing-a-delimited-list-in-a-database-column-really-that-bad](https://stackoverflow.com/questions/3653462/is-storing-a-delimited-list-in-a-database-column-really-that-bad). A JSON array is not much different from a comma delimited list. – Paul Spiegel Dec 26 '19 at 13:15

0 Answers0