I have two identical tables, one is for rows which are in a queue, and one is where I move my rows once they have been processed.(thousands of rows processed daily)
In my jobs table, I store ids to other tables and retrieve the values when needed through join statements, However once a row is processed, and I move this row into the final table, I am wondering whether I should just store the actual values here of what the ids refer to, instead of the ids like in the jobs table.
This final table is used encase I need to look up what happened in the past, a potential problem with storing just the id here is that if I ever change the value in the parent table(what the id references), my final table will be referencing incorrect values as the value has changed since its original entry.
I have not managed to come across this scenario in books yet, so I do not know terminology for this, Or if/how its handled.
I am also curios if perhaps I am handling the referenced data completely wrong? Perhaps I should not edit my original values once they are stored and every time I need to edit them, I enter a new row and start referencing that id? But this also doesn't sound like a good method.
Thanks in advance.