I'm designing SQL Server tables with Natural Keys instead of a Surrogate Keys for the Primary Key. The problem I've run into is that it doesn't work well with the Audit table format that I've used with Surrogate Key tables in the past. Typically I'll create an audit table that has the same columns as the table being audited. A trigger on the table being audited writes a new row to the audit table that matches the state of the row before update or delete. To enforce integrity I use both the Surrogate Key and modified date columns as a composite PK for the table. If I don't use a Surrogate Key then I cannot track changes if one of the columns that make up the composite key changes.
Log table example with Surrogate Key:
LogId (PK)
LogType
Data
ModifedDate
ModifedBy
LogAudit Table for Log table with Surrogate Key:
LogId (PK)
LogType
Data
ModifedDate (PK)
ModifedBy
Log table example with Natural Key:
LogType (PK)
Data
ModifedDate (PK)
ModifedBy
LogAudit Table for Log table with Natural Key:
LogType
Data
ModifedDate
ModifedBy
How do you track changes for Natural Key Log table record in the Audit table if LogType or ModifiedDate change?