Period & Salary

Harrold

Registered User.
Local time
Today, 17:02
Joined
Mar 17, 2011
Messages
72
Hi

in my payroll, two of the tables is for salary & period

tblSalary

SalaryID(PK)
EmployeeID(FK)
SalaryAmount
CalendarID(FK)
AccountsCode(FK)

tblCalendar

CalendarID(PK)
DateFrom
DateTo

I realise that, in salary table, i need to repeat the same data for different period, ie Nov 2011 and Dec 2011.

I wonder is it okay to have the same salary data till there are changes. ie in 2011, employee A's salary is $1000 every month. so instead of inputting the same data to salary table every month to show its calendar month, can i just leave it and not to input anything for the new month till there is a change for this data?

Shall i change my table structure for calendar?

Thanks
 
This doesn't make sense to me that you have a table named Salary. Salary is a dimension of something else, not an object in it's own right. Like, you wouldn't have a table called FirstName. FirstName is invariably an attribute of a person, an employee, or a student or something, so to link to a first name would be cumbersome.

A record in a table represents a discrete thing. A field in a table is a dimension of that thing. Salary is a dimension of an employee or a dimension of payment.

Time is that same. tblCalandar doesn't make sense. Time, like length or height or weight or amount, is always a measure or dimension of something else, and it can take on an infinite number of values.

Cheers,
Mark
 

Users who are viewing this thread

Back
Top Bottom