Hi all!
I am working on an inspection DB at work and I am having difficulty figuring out the best way to deal with dates for future inspections and to be able to have the data easily queried to find out what inspections are due.
In a nutshell:
1. sites need to be inspected 2, 5, 10 and every 10 years after construction;
2. if an issue is found on a site, the inspector chooses a re-inspection date to reassess the issue;
3. if there is an Environmental Incident Report (EIR) done on a site, the reviewer chooses a re-inspection date to monitor recover; and
4. if a new site is constructed, it needs to be inspected within a week of the reported construction date.
The data on issues is in tblIssue, EIRs in tblEIR, and new site construction in tblNotification. I originally thought that the re-inspection dates should be in their respective tables, but I couldn't figure out how to query them and also get the scheduled (2yr,5yr,10yr,etc) dates to pull from.
Also of note: there are over 20,000 sites in my DB.
Could someone assist me with finding the best method to store / recall these dates? I would be happy to provide any more detail if necessary, I just don't want to throw any irrelevance into the mix!
Thanks!
I am working on an inspection DB at work and I am having difficulty figuring out the best way to deal with dates for future inspections and to be able to have the data easily queried to find out what inspections are due.
In a nutshell:
1. sites need to be inspected 2, 5, 10 and every 10 years after construction;
2. if an issue is found on a site, the inspector chooses a re-inspection date to reassess the issue;
3. if there is an Environmental Incident Report (EIR) done on a site, the reviewer chooses a re-inspection date to monitor recover; and
4. if a new site is constructed, it needs to be inspected within a week of the reported construction date.
The data on issues is in tblIssue, EIRs in tblEIR, and new site construction in tblNotification. I originally thought that the re-inspection dates should be in their respective tables, but I couldn't figure out how to query them and also get the scheduled (2yr,5yr,10yr,etc) dates to pull from.
Also of note: there are over 20,000 sites in my DB.
Could someone assist me with finding the best method to store / recall these dates? I would be happy to provide any more detail if necessary, I just don't want to throw any irrelevance into the mix!
Thanks!