If we assume that the pay periods relate to the fiscal year, i.e. the start
and end of the tax year is also the start and end of a pay period then you
don't only need to relate the credits to the pay period as this determines
the fiscal year, e.g. if the fiscal year runs from 1 April to 31 March say,
and the pay periods are monthly then the third pay period of 2008 is in the
fiscal year 2007/08, but the fourth pay period of 2008 is in the fiscal year
2008/09.
So credits to Employee 42 in Department 1 in January 2008 would have values
such as Department 1, 2008-1, and 42, along with the credit hours, in a row
in a table which models the relationship between the Departments, PayPeriods
and Employees tables. Its then a simple matter of joining the tables,
grouping on whatever column(s) are relevant, and aggregating the credits.
So the aggregated credits could be by employee or department and over fiscal
year or pay period, i.e. whatever combination is required for any particular
purpose.
Ken Sheridan
Stafford, England