I've got a database having a report table. This table signifies report data, and it has constraints. The application can be used by firemen, plus they may need to elope and set out some fires. So in the center of completing data with this table, they may need to elope. What we should do happens when the session go out we save the information to some draft table, where we just serialize the item graph, no constraints (since we can not determine if things are inside a valid condition). So when the fireman later really wants to pull data out we just take out the draft again.

This works fine! Nevertheless the firemen now really wants to have the ability to search the table and also the draft table. Here I must maybe store all of the data (such as the draft) into one table, which i search, and so i do not have to consolidate the search from two tables..

Can there be some type of database pattern for drafts? Things I want is really a patternfor storing data without constraints (in draft mode) with constraints (in final mode).

I'm not sure whether it this could become qualified as a pattern, however i believe that the cleanest approach to take about this is to produce a view that does a union of these two tables and check against that.

I have no idea of the Database pattern for Drafts, but I recommend keeping your seperate table should you require validation and just looking for both tables.

Opt for the easy solution: produce a View which is simply a union of these two tables (that ought to be fairly easy because they I suppose both of them have (almost) identical structures) after which run searches on that because the source if they would like to include both.

I would not really merge the entire and draft data at any time: the opportunity of error and accidental utilization of unvalidated data appears huge.

You would not be focusing on an interface for that IRS within the United kingdom right now, can you? Otherwise, seems like DK go for the same (in principle) fix for your problem (I did previously work with a United kingdom Fire and Save Service).