I have a CASE(law firm type) table which uses a "case number" as a PK.
Each case can have zero-many "case plans" of three different types of
case plans, namely: (civil, tax, criminal).
I have created 3 different tables for each respective "case plan" type as their
details differ quite significantly. I have created an Audit table which holds
information about updates and inserts made to these tables.
My problem is referencing a specific "case plan" in the Audit table
as the CasePlanID in the Tax,Criminal,Civil tables could be the same, and
the only uniqueness to those tables is the table name (ie: Tax,Criminal,Civil).
I have thought of placing a "CONSTANT" column in each table with the type of the
Case plan as the value, but this introduces a lot of redundancy.
I have also thought of having an audit table for each respective case plan table
but this doesnt seem like good practice.
Perhaps a Generalisation class between Case and caseplans would help.
I also have to report across the case plans too.
Any help would be much appreciated ;-)