I am working on a project in which we need data to be entered or updated by some users undergoing a wait status before adding them to the "live data".
During data preparation, the user can save incomplete records. While the data is pending, we do not want the data to affect the rules imposed on users editing current data, for example. the user working with real-time data should not encounter a unique obstacle when entering the same data that is already in a waiting state.
I assume that the data update set will be grouped into a “data presentation” and the data will be re-checked and corrected / rejected / approved when someone controls the quality of the presentation.
I thought of two data storage scenarios:
1) Saving pending status data in the same table as the current data, but adding a flag to indicate its status. I could see here the problems associated with the need to remove prohibitions or create the necessary fields to support "incomplete" state data. Then there is a problem with the processing of updated data, you will need to add a new row for updating and associate it with an existing "live" row. It seems a little dirty to me.
2) Add new tables that reflect the current tables and store the data there until they are approved. This would allow me to fully control existing live tables, while pending tables can be abused by the way the user feels that he wants to insert them. The disadvantage of this is that I will have many additional tables / SP in db. Another issue that I was thinking about is how the user can link between two records, according to which the record associated with the record can be a record in a living table or one in a pending table, but I suppose in this situations you can always take a copy of the related record and consider it as an update?
None of the solutions seem perfect, but the second seems to be the best option for me - is there a third solution?
source share