Mysql – Having four different tables or having one table with one more field?

database-designMySQLoptimizationsqlite

I have a website with 4 translation (That is Arabic with 4 different Persian translation), and I had exported each of these translations to different tables.

Which one of these ways are faster and better:

1- Merging or Importing all of this translation (tables) to one table,
and name it nahj_all and adding a flag field to table to clarify
what translation is it (for example flag with numbers 1, 2, 3 and
4)
.

OR

2- Importing each translation to different tables and get diffrent
name to them according to translation name (or number), for example
nahj_feiz, nahj_jafari, nahj_dashti, nahj_shahidi

I have these tables in MySql and I want to convert database to sqlite

Which one is better for sqllite?

Which way is better for MySql?

Best Answer

Having all languages in one table is an overhead. Each time you will have to load the data of all languages and use part of (for one language), or you will add a condition to your query to load one language's data, which is also an overhead. In my opinion, having each language is a separate table is lighter. However, if the load on your website is low, and your translation data is not big, the difference will be negligible.