Stored Procedure, Trigger & Cursor in MariaDB

Опубликовано: 11 Июнь 2026
на канале: Carmen Jurado Fernandez
6
0

In this video, I demonstrate three database tasks for a restaurant management system using MariaDB:

1️⃣ **Stored Procedure**: Lists all ingredients with stock below a given minimum level.
2️⃣ **Trigger**: Prevents ingredient stock from going below zero during updates.
3️⃣ **Cursor **: Iterates through all categories to count and display the number of dishes in each one.

I explain the SQL code line by line, show how each object works, and verify its execution in MariaDB.

🔧 **Tools used**:
MariaDB 10.x on Debian Linux

📁 **Database model**:
The database includes tables for categories, dishes, ingredients, orders, and order details. CSV files were loaded to populate initial data.

This project is part of my coursework in Database Systems.