Posts for: #SQL

100 Must-Know MySQL Interview Questions & Solutions (Employees Dataset)

100 MySQL Practice Questions & Answers

A comprehensive, production-grade collection of 100 real-world SQL interview questions and battle-tested solutions built directly on the official MySQL employees relational database.

[!tip] 🚀 Practice Online in Your Browser (No Setup / Installation Required) Practicing on a work/restricted laptop without MySQL installed? You can run and practice all these queries live with the preloaded dataset right in your browser: 👉 Open the Web SQL Playground (Runs 100% in-browser, preloaded with Employees & ClassicModels data).

Read more →

dbms- file_structure

B-Tree

🌳 B-Tree Nomenclature

  • Order (m) → max children = m
  • Max keys → m − 1
  • Min keys (non-root) → ⌈m/2⌉ − 1
  • Children vs Keys → keys = children − 1
  • Root → minimum 1 key
  • Internal node → has children
  • Leaf node → no children
  • All leaves → same level (balanced)
  • Height → O(logₘ n) Image Description

Insert Operation

Image Description

Insert Operation another example

B-Tree of Order 5 Insert Keys 7, 4, 14, 25, 3, 10, 12, 15, 17, 9, 29, 1, 38, 2, 11
Image Description Image Description Image Description Image Description

Read more →

dbms- transaction

Definition

A transaction in DBMS is a finite sequence of database operations that is executed as one logical unit of work, meaning either all operations are performed successfully or none are performed.

-- Example for "logical unite of work"
Read(A)
A = A − 100
Write(A)
Read(B)
B = B + 100
Write(B)
Commit

A transaction must satisfy the ACID properties to ensure database correctness and consistency.

Image Description


Key Points

  • A transaction groups multiple database operations into a single logical task
  • Partial execution is not allowed
  • Failure of any operation causes the entire transaction to rollback
  • Ensures reliability in concurrent and failure-prone environments

ACID Properties (Overview)

  • Atomicity – All operations execute or none execute
  • Consistency – Database remains in a valid state
  • Isolation – Transactions do not interfere with each other
  • Durability – Committed changes persist permanently

Schedule

A schedule is the execution order of operations of multiple transactions on the same database, possibly executed concurrently.

Read more →

my-projects

Introduction

Welcome to my Project Space, It’s hard to update this, as I don’t usually public what I have developed or developing, but here are the things which you might check.

Easy Access

To Easily navigate through my notes use tags…..

📌 Quick Tag Index

#Agile (6) • #blender (1) • #blog (2) • #C (1) • #cheatsheet (1) • #Chennai (1) • #COA (1) • #Code (1) • #COURSE (1) • #custom (1) • #database (1) • #DBMS (2) • #devops (1) • #Elite_Tech_Park (1) • #GATE (3) • #Hands (1) • #Hands_On (1) • #hibernate (1) • #incubator (1) • #interview-prep (1) • #java (1) • #joins (1) • #js (1) • #linkedin (3) • #loadtesting (1) • #MCA (1) • #mysql (1) • #On (1) • #PL/SQL (1) • #post (9) • #Practical (1) • #python (1) • #react (1) • #SASTRA (1) • #security (1) • #selenium (1) • #shortcuts (1) • #spring (1) • #springboot (2) • #SQL (4) • #subqueries (1) • #TCS (8) • #testing (2) • #Theory (7) • #Theory/code (3) • #tricks (1) • #UDEMY (1) • #Visit (1) • #webtech (1) • #welcome (1) • #window-functions (1) • #Zoho (1)

Read more →

my-projects

Introduction

Welcome to my Project Space, It’s hard to update this, as I don’t usually public what I have developed or developing, but here are the things which you might check.

Easy Access

To Easily navigate through my notes use tags…..

📌 Quick Tag Index

#Agile (6) • #blender (1) • #blog (2) • #C (1) • #cheatsheet (1) • #Chennai (1) • #COA (1) • #Code (1) • #COURSE (1) • #custom (1) • #database (1) • #DBMS (2) • #devops (1) • #Elite_Tech_Park (1) • #GATE (3) • #Hands (1) • #Hands_On (1) • #hibernate (1) • #incubator (1) • #interview-prep (1) • #java (1) • #joins (1) • #js (1) • #linkedin (3) • #loadtesting (1) • #MCA (1) • #mysql (1) • #On (1) • #PL/SQL (1) • #post (9) • #Practical (1) • #python (1) • #react (1) • #SASTRA (1) • #security (1) • #selenium (1) • #shortcuts (1) • #spring (1) • #springboot (2) • #SQL (4) • #subqueries (1) • #TCS (8) • #testing (2) • #Theory (7) • #Theory/code (3) • #tricks (1) • #UDEMY (1) • #Visit (1) • #webtech (1) • #welcome (1) • #window-functions (1) • #Zoho (1)

Read more →

PL/SQL Full Notes

What is PL/SQL?

  1. PL/SQL stands for Procedural Language Extension to SQL
  2. It is a Extension of SQL developed by Oracle.
  3. It adds SQL capabilities of procedural programming like variables, loops and conditional statements in SQL.

PL/SQL Architecture

Physical Architecture

Image Description

  • PL/SQL engine processes the entire PL/SQL block of code.
  • It Separate SQL statements and Procedural statements.

Simple Architecture Flow

Image Description

PL/SQL Logical Architecture

  • Corporates with SQL Engine.
  • Enables Subprograms -> Allows re-usability of code/script like variables and functions.
  • Dynamic Queries-> We can modify or create new Queries.
  • Case Insensitivity
  • Optimizer-> It optimizes our code for better performance.
  • Enables Object-Oriented Programming
  • Web Development #Extras Context Switching: When you write SQL Query in PL/SQL the PL/SQL send the query to SQL Engine and the result will be returned this operation is called Context Switching.

Pluggable Database

Image Description

Read more →