Reputation: 979
I realize that there are similar questions answered on this site but I could not get the solution for me from those questions. For example, I have 10.000 posts in the website and each of those posts has 50 reviews. Should I create
1.One table with 500.000 rows (reviews)
or
2 .10.000 tables (each post has its own table for reviews (50 rows)) Could you help me to understand please.
Upvotes: 0
Views: 251
Reputation: 360
Upvotes: 0
Reputation: 211
I'd create a table named POST and a table named REVIEW. Each post has an ID (primary key of the table POST) that you can use as foreign key in the table REVIEW to index all reviews relative to a post. And as Tim Castelijns just said, 500k row are nothing for a normal DB and its performances are not really going affected by this.
Upvotes: 1