A fully functional payroll management system built using Oracle PL/SQL, demonstrating core database programming concepts applicable to real-world enterprise environments.
- Auto-generates realistic employee data using
DBMS_RANDOMand PL/SQL collections - Calculates monthly payroll with role-based bonus logic
- Automatically logs every salary change via a
BEFORE UPDATEtrigger - All modules bundled into an organized PL/SQL package
| Concept | Implementation |
|---|---|
| Block Structure | All scripts |
| Variables & %TYPE | Data generator, procedures |
| Stored Procedures | add_employee, process_monthly_payroll |
| Functions | calculate_bonus, get_total_payout |
| Cursors | Payroll processing, report generation |
| Triggers | trg_salary_audit — auto audit on salary change |
| Exception Handling | All modules |
| Packages | payroll_pkg — bundles all components |
| BULK COLLECT | Dynamic dept ID loading in data generator |
- Open Oracle SQL Developer and connect to your schema
- Run scripts in order:
01_→02_→ ... →08_ - Enable DBMS Output: View → Dbms Output → Click +
- Execute the test script to see output
departments → employees → payroll ↘ salary_audit (via trigger)
- Oracle Database (XE / 19c / 21c)
- Oracle SQL Developer
- PL/SQL