I have to create 2 tables:
Magazine ( 10 millions of rows with these columns: id, title, genres, printing, price )
Author ( 180 millions of rows with these columns: id, name, magazine_id )
. Every author can write on ONLY ONE magazine and every magazine has more authors.
So if I want to know all authors of Motors Magazine, I have to use this query:
SELECT * FROM Author, Magazine WHERE ( Author.magazine_id = Magazine.id ) AND ( genres = 'Motors' )
The same applies to Printing and Price column.
To avoid these joins with tables of millions of rows, I thought to use this tables:
Magazine ( 10 millions of rows with this column: id, title, genres, printing, price )
Author ( 180 millions of rows with this column: id, name, magazine_id, genres, printing, price )
. and this query:
SELECT * FROM Author WHERE genres = 'Motors'
Is it a good approach ?
I want to make it run faster
I can use Postgresql or Mysql.