I manage an online catalog. Currently in-house personnel update it manually, and their changes are immediately visible. Now we want to add a verification step: Tom makes a change, Jerry approves it.
I see two paths, but neither seems elegant.
- Keep a second, 'working copy' of the whole database.
- Keep a second set of 'dirty' tables inside the same database.
Both of these seem to require a lot of code just for housekeeping, as well as double the work whenever the structure of a table changes.
Is there a better way? In case it matters, the DBMS is SQL Server, the web app is asp.net.
Edited to add:
The two changes I outlined above are both backward-compatible with existing code. I know I'm going to have to make some changes, but I can't alter every query.
I think my key constraints prohibit simply cloning rows and marking them 'pending'.
Let's say Supplier with SupplierID 99 has two Products. (Products can belong to only one SupplierID.) The Supplier's phone number has changed, so I clone the Supplier record, change the phone number, and mark it 'pending'. But the new record can't have an ID of 99, so there's no longer a way to connect it to either its Products or even the record it's intended to replace.
I suppose I could add an unconstrained identifier, SupplierPseudoID, but this seems just as complicated and error-prone as the above ideas.