Hello. There is approximately the following table with films films :
+-----+---------------+----------+ | id | premiere_date | duration | +-----+---------------+----------+ | 432 | 2015-10-11 | 68 | | 433 | 2015-10-28 | 125 | +-----+---------------+----------+ The id field in it is incremental and is the primary key. There is also a table with the names of films films_titles :
+---------+----------------+------------+------------------------------------------+ | film_id | title_language | title_type | title | +---------+----------------+------------+------------------------------------------+ | 432 | en | 1 | Intouchables | | 432 | ru | 2 | 1+1 | | 432 | ru | 3 | Неприкасаемые | | 433 | en | 1 | The Hunger Games | | 433 | ru | 2 | Голодные игры | | 433 | de | 2 | Die Tribute von Panem – The Hunger Games | +---------+----------------+------------+------------------------------------------+ The title_type field is the type of movie title. For example, 1 is the original language (there can be only one for the film), 2 is the official names in other languages (there can be only one for each language), 3 are unofficial names.
Actually, the main question: how would you improve these tables?
Now all the tables are in my InnoDB, through the foreign key I connected the film_id field with the id field. Maybe on some fields you can hang indexes? I read about them, but I just can’t understand real use cases. You can also do something so that you can't add two titles with the same film_id , title_language and title_type ? To, for example, not accidentally add two official English film titles, which, logically, should be only one.
UPD. Table films will have a little more than 30.000 entries, and film_titles - about 3 times more.
Thank you in advance.