mysql - Maintaining the history of values in table/ track the changes of table by date -


following table structure:

project_id      module_id      pass fail retest not_executed total test_1         test_1_mod_1   10   5    2      2            19 test_1         test_1_mod_2   20   5    5      0            30 test_1         test_1_mod_3   30   5    2      0            37 test_1         test_1_mod_4   40   5    7      2            54 test_1         test_1_mod_5   50   5    2      0            57 

and every day update numbers in pass, fail, retest, net executed , total column of table. doing using webpage (as front end both viewing , updating table).

now problem arises when want see status of 2 days before. more clear, data of mar-09 like:

project_id      module_id      pass fail retest not_executed total test_1         test_1_mod_1   10   5    2      2            19 test_1         test_1_mod_2   20   5    5      0            30 test_1         test_1_mod_3   30   5    2      0            37 test_1         test_1_mod_4   40   5    7      2            54 test_1         test_1_mod_5   50   5    2      0            57 

and on mar-10 updated values in table

project_id      module_id      pass fail retest not_executed total test_1         test_1_mod_1   20   5    2      2            29 test_1         test_1_mod_2   20   5    5      5            35 test_1         test_1_mod_3   30   5    12     0            47 test_1         test_1_mod_4   40   5    7      2            54 test_1         test_1_mod_5   60   5    2      0            67 

and on mar-11 want see status of mar-09 is:

project_id      module_id      pass fail retest not_executed total test_1         test_1_mod_1   10   5    2      2            19 test_1         test_1_mod_2   20   5    5      0            30 test_1         test_1_mod_3   30   5    2      0            37 test_1         test_1_mod_4   40   5    7      2            54 test_1         test_1_mod_5   50   5    2      0            57 

i have non-feasible solution add new column in table called 'date_updated' , should insert new rows each module everyday. i'm afraid increase table space.

is best practice? or have other better solution? please help!

any appreciated!


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -