1

I am struggling to define an effective process of revisioning. We have some data spread across multiple tables. We cannot delete or update, we need to create new issues of the same data. I know the solution of a history table containing all revisions etc, but that seems to work fine as long as you want to keep revisions of simple structures, such as a Blogging-platform.

What if you have a database with many complex structures, where the simplest of them looks like this below.

Simple table with relations

If you change something in tableA, you can keep the old data in a history table. What happens though if you change something in TableB, which defines what a record in TableA is? It almost forces you to create a copy of TableA (new ID in other words) and recreate it's underlying structures (more new IDs). The whole process of creating a new ID each time a mistake is corrected or some peripheral data is added, doesn't feel ok.

Is there any good practice for such cases? I read somewhere about keeping the whole old data structure revisioned in XML, but that practice can be reluctant to schema changes and it is not easily querable. Technologies such as Flashback doesn't cover the whole spectrum of our needs either.

Tip: We're using Oracle v11.2.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Midas
  • 564
  • 6
  • 21
  • If you are using the Enterprise edition, a flashback *archive* (for each involved table) might be what you are looking for. http://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01011 then you actually _could_ delete and update as much as you want. –  Aug 10 '15 at 10:04
  • @a_horse_with_no_name Flashback could work, but it doesn't save you when you need to have 2 issues parallelly (e.g. for experimentation before release/replacement). – Midas Aug 10 '15 at 10:14

0 Answers0