On 27-Jul-2001 David wrote:
> I want to log my paychecks in my own database for my own personal use. I
> am in the design phase: Do I need a table for year to date since this
> can be calculated automatically?  I don't want to have to enter a lot of
> information when entering the data for each pay period. How many tables
> are normally used for something like this? Here is what I have so far
> 
> Table 1: Rarely changes
> Company:
> Address:
> Phone:
> Employee ID:
> 
> 

<snip>

I'll suggest a hint from how most payroll programs do it.

Use a check register file, primary key on the check number (in your case 
chk# + companyId).

CheckId
CompanyId
Period_end
 --- Hours ---
Rate
Reg_hours
OT_hours
Sick -> Holiday_hours

 --- Earnings ---
Hourly
Bonus
Other
Gross
 --- Required deductions ---
FedTax
FICA_S
FICA_M
StTax
 etc ...
 --- nontaxable deductions ---
401K
ESOP (were qualified)
MedSave
 etc ...
 --- taxable deductions ---
Uniforms
ChildSupport
ParkingFee
 etc ...

Basically everthing is calculated, at end of quarter/year, you print the
rollup, backup the table and restart.

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to