I hope someone can help me solve this puzzle:
I am designing a database that will link documents to training events on those documents and the employees present at the training events. The employees needing the training is determined by the employee’s job description.
Tables: (jt represents a junction table)
tbl_Employees
jt_Emp_JD each employee has many job descriptions
tbl_JobDescriptions
jt_JD_Doc each job description has many associated documents
tbl_Documents
jt_Doc_TE each document will have many associated trainings
tbl_TrainingEvents
jt_TE_Emp each training event will have many employees present
The documents are updated periodically, resulting in a change in the revision number (a field in tbl_Documents).
The employees are required to have training on the current documents, but records of past training must also be kept.
My question is this: How do I set up the referential integrity so that a training event can only be based on a document currently in tbl_Documents, but once a document is updated, it does not update the records of past training events so that the record in jt_TE_Emp will show that they were trained on the previous version but not yet on the current version?
I had thought about leaving the old document in and adding the revision in as a new document and enforcing referential integrity, but then I couldn’t figure out how to update the jt_JD_Doc to reference the new document revision (if I just update the doc instead of replacing it and cascade the update to that table, then voila)
Any advice?
I am designing a database that will link documents to training events on those documents and the employees present at the training events. The employees needing the training is determined by the employee’s job description.
Tables: (jt represents a junction table)
tbl_Employees
jt_Emp_JD each employee has many job descriptions
tbl_JobDescriptions
jt_JD_Doc each job description has many associated documents
tbl_Documents
jt_Doc_TE each document will have many associated trainings
tbl_TrainingEvents
jt_TE_Emp each training event will have many employees present
The documents are updated periodically, resulting in a change in the revision number (a field in tbl_Documents).
The employees are required to have training on the current documents, but records of past training must also be kept.
My question is this: How do I set up the referential integrity so that a training event can only be based on a document currently in tbl_Documents, but once a document is updated, it does not update the records of past training events so that the record in jt_TE_Emp will show that they were trained on the previous version but not yet on the current version?

I had thought about leaving the old document in and adding the revision in as a new document and enforcing referential integrity, but then I couldn’t figure out how to update the jt_JD_Doc to reference the new document revision (if I just update the doc instead of replacing it and cascade the update to that table, then voila)
Any advice?