Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Problem

431621Oct 21 2004 — edited Oct 25 2004
Hey guys I have to finish off this PL/SQL assignment but this one problem is giving me hell. Could any kind soul please help me. My schema goes like this:
Employee (F-name, L-name, SSN, birth-date, address, sex, salary, supervisor-SSN, department-no, start-date)
Department (department-name, d-number, Manager-SSN, Manager-start-date)
Deartment_locations(d-number, d-location)
Project(p-name, p-number, p-location, D-no)
Works_on(employee-SSN, project-no, hours)
Dependent (employee-SSN, dependent-name, sex, birth-date, relationship)

And the question is:
Write a PL/SQL program to calculate the yearly bonus that the company gives to its employees. The company determines the bonus amount by considering four factors: (1) how many years the employees has worked at the company, (2) the employee’s job type, (3) how many projects the employee has worked on, and (4) how many dependents the employee has.
•If an employee has worked at the company from 2 – 5 years, then he/she receives a $200 bonus; 6 – 10 years merits a $500 bonus; and over 10 years merits a $1000 bonus.
•For job type, managers receive an additional $300 bonus.
•If an employee has worked on one project, then he/she receives a $100 bonus; two projects merits a $150 bonus; and over 2 projects merits a $200 bonus.
•Finally, if an employee has one dependent, then he/she receives a $1000 benefit; two dependents receives a $1500 benefit; and more than two dependents receives a $2000 benefit.

Display the calculated bonus for each employee.

Any help would be greatly appreciated!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2004
Added on Oct 21 2004
10 comments
1,170 views