Multiple rows vs Single row with JSON What is the most optimal way to do this?


In TV Show page I need to get all progress from all episodes in that TV Show
In Homepage I need to get the continue_watching
In Episode I need to get progress of the episode.
Some TV Shows have more than 100 episodes


Ex:

USER_ID | SHOW_ID | LAST_SEEN_ID | LAST_SEEN_TIME
10      | 5       | 12           | ---

USER_ID | EPISODE_ID | PROGRESS
10      | 10         | 15
10      | 11         | 20
10      | 12         | 95


OR

USER_ID | SHOW_ID | PROGRESS                     | LAST_SEEN_ID | LAST_SEEN_TIME
10      | 5       | {"10":15, "11":20, "12": 95} | 12           | ---


In PosgreSQL I can get the individual progress with:

SELECT progress-&gt;'10' as progress...


I think that the best method is the first but it will create a lot of rows and this could make DB slower?
I think that the best method is the first ... 


Simply put, it is.


  ... but it will create a lot of rows ... 


Yes, it will.
Don't worry. 


  ... and this could make DB slower? 


Relational databases are really, really good at running around large numbers of rows in many tables and putting things together.  With proper indexing, this structure will handle large numbers of rows with no problem at all and is the most flexible, so will support many different types of query well.