Just imagine one guest from Room number 101 calls Reception and asks to change their meal order.
Let’s see how the journey works step by step:
User issues the UPDATE statement
Oracle: Client sends an UPDATE SQL query.
Hotel: Guest from Room 101 calls Reception and asks to change their meal order.
Syntax Check
Oracle: Server checks SQL statement for correct spelling, structure, and semicolons.
Hotel: The receptionist checks if the request is properly mentioned, including room number, food item name, etc.
Semantic Check
Oracle: Checks if the table and column names exist and the user has permission.
Hotel: Confirms if the room exists and the guest can change their order.
Object Resolution
Oracle: Verifies which table the data belongs to and identifies related objects.
Hotel: Reception finds which kitchen team handles this room’s service.
Optimization
Oracle: Chooses the best way (execution plan) to perform the update — table scan or index.
Hotel: Decides the fastest waiter and shortest route to the kitchen to get this done.
Row Source Generation
Oracle: Builds a plan on how to fetch and update the rows.
Hotel: Waiter gets instructions on where to go and what to do.
Server Process → PGA
Oracle: Server process uses memory (PGA) to track the execution state.
Hotel: Waiter uses a notepad (PGA) to write the new order details.
Data Fetch (Buffer Cache or Disk)
Oracle: Retrieves current data from Buffer Cache or datafiles if not cached.
Hotel: Waiter checks current order in the kitchen records (Buffer or Log book).
Apply Update (in Buffer Cache)
Oracle: Updates the data in memory (Buffer Cache) — not yet permanent.
Hotel: Waiter updates the kitchen slip with new order — not yet served.
Write to Redo Log
Oracle: Writes the update operation to Redo Log for recovery purpose.
Hotel: Logs this order change in the hotel register in case of issues later.
Commit / Rollback
Oracle: If COMMIT is issued, the change becomes permanent.
Hotel: Guest confirms the change (COMMIT) or cancels it (ROLLBACK).
Control Returns to User
Oracle: Oracle sends a success message to the client.
Hotel: The receptionist calls the guest and confirms that the new order is updated.
FInally!!
Data updated successfully in the database
Guest's order updated in the kitchen



0 Comments