Functions & Stored Procedures
Write a script that creates:
- At least 3 functions that encapsulate reusable logic or calculations relevant to your database
- At least 2 stored procedures that perform
SELECT
andINSERT
operations - At least 2 stored procedures that perform
UPDATE
operations
Each function and stored procedure should be well-documented with comments explaining its purpose, parameters, and expected behavior. Scripts should be executable in PostgreSQL
.
Include test calls/examples for each function/procedure, and optionally demonstrate error handling or transaction management.
Submit your functions and procedures as a single SQL file unless otherwise instructed.
On top of the code and documentation deliverables, each team member must record a short video (approximately 2 minutes per person) describing the part of the solution they were responsible for. The video should briefly explain your contribution, the challenges you faced, and how you addressed them. The free version of Zoom allows recording of videos during a conference call, making it easy for teams to collaborate and record together. Once recorded, the video can be uploaded to Google Drive or YouTube (as an unlisted video), and the link should be provided as part of the graded material.