I am currently building a rails application based around insurance. There is an admin section where the staff can control the system tables, mostly what appears in drop down lists, although some are more complex with their own associations. The main model in this application is the policy, this needs to hold/link to information in many other tables, e.g. claimants, defendants, the level of cover, the users etc. Each of those may have their own associations such as linking to a person which in turn links to addresses etc.
One of the more complicated tables that the policy links to is the overall level of cover which holds the financial information to determine the premium, payments etc.
When a policy is created I need to take a snapshot of all that data. If the policy is amended by an admin user later there needs to be version control, even on the associated data.
I'm wondering if anyone has any general solutions to this problem. Currently I'm pondering over orphan records, single table inheritance, leaving the system table links in place but making that data non-editable, coping the data into a fields in the policy table (making it a text box on edit, select box on create) or creating two tables, one for live, one for the templates.
So far the best I can think of is a collection of the different methods above based on the applications needs. This must be a general problem in applications!? Do you have any better ideas/advice on how to tackle this type of problem?