Procedures in MySQL using Flight Booking System

Business Scenario

Welcome back,Developers!

In the previous lab, we used SQL JOINs to combine data from multiple tables and generate booking reports.

But imagine the SkyReserve application needs to perform the same database operations hundreds of times every day—such as retrieving flight details, updating ticket prices, or checking seat availability.

Should we write the same SQL queries again and again?

Of course not!

So, your next task is to automate these repetitive operations using Stored Procedures. By storing SQL logic inside the database, you can execute complex tasks with a single command, making the application faster, more secure, and easier to maintain.

Pre-Lab Preparation

Git Pull

git pull origin branchName

Task 1: Procedure using IN Parameter

Select the existing database.

1

1

Topic :

1) Basic SQL Queries

2) Understanding of Stored Procedures in MySQL

Create procedure using IN parameter.

2

1

Execute the procedure.

3

1

Task 2: Procedure using OUT Parameter

Create procedure using OUT parameter and execute the procedure

1

1

Create procedure using OUT parameter and execute the procedure

2

1

Task 3: Procedure using INOUT Parameter

Create procedure using INOUT parameter.

1

1

Execute the procedure and check the output

2

1

Task 4: Procedure using  IF ELSE Condition

Create procedure to check seat availability.

1

1

Execute the procedure

2

1

 

Great job!
You have successfully created and executed Stored Procedures using IN, OUT, and INOUT parameters.

Checkpoint

git push origin branchName

Git Pull

Next-Lab Preparation

Topic :

1) Basic SQL Queries

2) Understanding of Built-in functions