Hi all,
I’m trying to do an optimal database design and I’m stuck. In a nutshell what I have and what I’m looking for:
- There is a multi language (4 countries) application
- For each language I need to store 1 500 000 rows per year
- The table has only 4 columns and one FK
- There is a view selecting in the actual country: employee, sum of top 10 salaries, count of work shift in a month
- Insert into DB is 1 a day, selecting from the view is 1000 a day
The question:
Shall I store data in one big table with 4 500 000 rows per year and select with language condition (Sample 1) or separate data into 4 small tables (Sample 2)?
Sample 1:
------------------------------------------------------------------
T_Results
---------------
IdResult
IdImport
Employee
Salary
T_Import
----------------
IdImport
ImportDate
Language
Sample 2:
-----------------------------------------------------------------
T_Results_EN
----------------
IdResult
IdImport
Employee
Salary
T_Import_EN
----------------
IdImport
ImportDate
T_Results_DE
----------------
IdResult
IdImport
Employee
Salary
T_Import_DE
----------------
IdImport
ImportDate
Thanks a lot!
Marw
Hi all,
I’m trying to do an optimal database design and I’m stuck. In a nutshell what I have and what I’m looking for:
- There is a multi language (4 countries) application.
- For each language I need to store 1 500 000 rows per year.
- The table has only 4 columns and one FK.
- There are 4 views selecting from the countries: employee, sum of top 10 salaries, count of work shift in a month.
- Insert into DB is 1 a day, selecting from the view is 1000 a day.
The question:
Shall I store data in one big table with 4 500 000 rows per year and make the views with language condition (Sample 1) or separate data into 4 small tables (Sample 2)?
Sample 1:
----------------------------------------
T_Results
IdResult
IdImport
Employee
Salary
T_Import
IdImport
ImportDate
Language
Sample 2:
----------------------------------------
T_Results_EN
IdResult
IdImport
Employee
Salary
T_Import_EN
IdImport
ImportDate
Language
T_Results_DE
IdResult
IdImport
Employee
Salary
T_Import_DE
IdImport
ImportDate
Language
Thanks a lot!
Marw