A design model for a model that contains data changes until another user resolves

Is there a design pattern that should be considered when building a data model for a banking application that requires changing data to pass the authorization level?

For example, if admin1 changes the phone number for client1, this change should not be effective until admin2 resolves it.

The solution that we plan to implement is to have a temporary table for storing the changed record with the changed values, and as soon as the authorizer approves this change, we will update the main table. This works great when you have few tables, but will be cumbersome as the tables grow.

+3
source share
3

, , .

, 'Pending_Changes' 'Table_Identifier', 'Column_Identifier' 'Record_Identifier' 'New_Value'.
.
- ('Customers', 'Phone_Number', '12345', '077-4453432') 12345.
: 1.
2. PendingChanges, .

- .

+1

, ,

. , . , . , .

. , AuditTables, AuditColumns, AuditChanges, AuditChangesDetails .., , , , "live".

+1

- , ;

  • , . , CUSTOMER. VER_CUSTOMER , , RECORD_ID (GUID)
  • , , GUID . ​​ VER_CUSTOMER RECORD_ID, natural PK. , GUID. RECORD_ID GUID. VER_CUSTOMER.
  • When a record is deleted, I mark the record in the CUSTOMER table as DELETED (do not physically delete the record). I have an IS_DELETED column for each table. I set this column to TRUE when the record was deleted. Again, a copy of the deleted record is also included in the VER_CUSTOMER table.
  • Thus, each transaction that you have on this table, you have a corresponding entry in the VER_CUSTOMER table with RECORD_ID and table natural PK as PK. For example, if the table CUSTOMER PK is CUST_ID. PK VER_CUSTOMER will be composite CUST_ID and RECORD_ID.

Hope this helps ...

0
source

All Articles