Design Help: Do I need to duplicate data?
Posted by: Matt Houser
Date: May 31, 2011 09:18PM

I currently have the following schema (simplified):

scripts table
- id int
- execution time

actions table
- script id
- execution sequence
- action details (many columns)

So I have a table of "scripts" along with "actions" belonging to each "script".

1. Each script could be long-running (over many hours) and in case disaster occurs, "state" of the script needs to be recorded back to the db between each action so that it can be resumed.

2. Script executions could be overlapping... meaning one script could start at 12pm and 2pm, and each of the 2 instances would be running for 6 hours.

3. It's possible for a user to "modify" a script after it started, but before it finished. If this happens, I do not want the existing instances to be modified. Only future executions should be affected.

Based on the above, I am thinking that I need to "duplicate" the scripts and actions at the start of each execution. This could be accomplished in a couple of different ways:
(a) 2nd set of tables with similar schema. One set of tables for script templates, one set of tables for current/past instances
(b) Use 2nd db instead of 2nd set of tables
(c) Inter-mix running and template scripts and actions in the same tables
(d) Other?

Based on the above, does anyone have any suggestions?

Thanks,
...Matt

Options: ReplyQuote


Subject
Written By
Posted
Design Help: Do I need to duplicate data?
May 31, 2011 09:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.