01 · Study project · 2024
Resource allocation in PL/SQL
Flow
- projects · employees · skills
- ALLOCATE / DEALLOCATE
- allocations
- error log
- Context
- A classic business-system problem: assigning people to projects based on the required skills, taking existing allocations into account.
- Goal
- A procedure that assigns resources automatically and repeatably, handles projects already under way and logs every error.
- Contribution
- Solo project: data model, setup scripts, PL/SQL logic and documentation.
- Technical choices
- Separate ALLOCATE and DEALLOCATE procedures, with a project-existence check and explicit errors.
- Cursors ordered by skill count and hire date, so resources are chosen deterministically.
- A PKG_UTILS package with a logging procedure writing to a dedicated table, reused at every step.
- Numbered scripts (user and grants → DDL → DML → package → procedures) for a repeatable setup.
- Outcome
- Public code and README: the schema and procedures install by running the scripts in order.
