SQL.ODYSSEY BABYLON 3D ENGINE // V2.6
WELCOME TO THE SQL MATRIX

MASTER SQL IN 3D SPACE

Step into a spatial universe where Relational Databases are not boring flat tables, but vibrant, interconnected 3D holographic structures powered by Babylon.js WebGL.

SCROLL TO FLY THROUGH DIMENSIONS
CHAPTER 01 // ARCHITECTURE

The Anatomy of a Table

In SQL, everything begins with relations. A Table is a 3D coordinate grid of memory: Columns define attributes and types, while Rows (Tuples) represent distinct physical data cubes floating in the database cluster.

SQL // DDL
CREATE TABLE starships (
  id INT PRIMARY KEY,
  name VARCHAR(50),
  class VARCHAR(30),
  warp_speed FLOAT,
  shields INT
);
Hover over or click on any 3D data cube to inspect its live relational tuple in the HUD!
CHAPTER 02 // PROJECTION

SELECT: Spatial Column Laser

SELECT does not copy data; it acts as a spatial prism beam extracting only the requested dimensional axes. Querying SELECT name, warp_speed isolates specific coordinate planes, collapsing unneeded attributes.

SQL // QUERY
SELECT name, warp_speed, shields
FROM starships;
CHAPTER 03 // SELECTION

WHERE: The Laser Scanner

The WHERE clause sweeps through rows like a particle laser. Cubes satisfying the boolean predicate ignite with radiant energy; non-matching cubes dissolve into holographic wireframes.

SQL // FILTER
SELECT * FROM starships
WHERE shields >= 75;
ADJUST SHIELD THRESHOLD: 75%
CHAPTER 04 // RELATIONS

JOIN: Entangled Light Bridges

Relational power unlocks when two distinct 3D tables connect. Foreign keys ignite laser links across space. Choose a JOIN topology below to witness how INNER, LEFT, RIGHT, and FULL OUTER morph the resulting platform!

SELECT pilots.name, starships.name 
FROM pilots
INNER JOIN starships 
  ON pilots.ship_id = starships.id;
CHAPTER 05 // COMPRESSION

GROUP BY & Aggregation Gravitons

GROUP BY compresses discrete records into dense gravity wells. Mathematical operators (COUNT, SUM, AVG, MAX) measure energy within each cluster, while HAVING filters entire collapsed pillars.

SELECT class, 
       COUNT(*) AS ship_count,
       AVG(warp_speed) AS avg_speed
FROM starships
GROUP BY class;
CHAPTER 06 // OPTIMIZATION

B-Tree Indexes: Warping Query Space

Without an index, the database must perform a grueling Full Table Scan $O(N)$ checking every block in storage. A B-Tree Index creates a 3D branching hyperlane, finding the target record in logarithmic $O(\log N)$ leaps!

FULL TABLE SCAN [O(N)]
1,024 MS (10,000 LOOKUPS)
B-TREE INDEX [O(log N)]
3 MS (4 HOPS)
CYBER SQL CONSOLE // LIVE 3D ENGINE
PRESETS:
READY // 0.00ms
SQL QUEST ARENA
XP: 450

Mission 1: The High Shield Vanguard

Write a query to retrieve all starships with shields >= 80 and warp_speed > 7.0.

Use: WHERE shields >= 80 AND warp_speed > 7.0
1 / 5