SELECT * FROM Shiraverse · All notes · Video 1
SQL course · Video 1 · Notes

Meet RetailMart: the database we use in this SQL course

No coding and no experience needed. In about eight minutes you will learn what a database is (with a library, an almirah, a book and a page), how a business becomes tables, and how our 55-table practice database, RetailMart, is organised.

Meet RetailMart

Ordered at 11 PM.
At your door by 8 AM.

🌙
☀️
🚚
11 PM: you tap "Buy"
8 AM: doorbell

Itni jaldi kaise? How is that even possible? The answer is data.

The idea: when you order something at night and it arrives in the morning, that is not magic. Every step of the journey is written down somewhere, as data. This video is a tour of a small, realistic version of that world. No coding and no experience needed.

First things first

What is a database?

Library databaseAlmirah schemaBook tablePage row
Hazaron kitaabein, sab ek jagah. Thousands of books, all in one place, neatly organised. A computer keeps data the same way, in a database.
Ek almirah, ek topic. One almirah, one topic. In SQL, an almirah is a schema. Click the glowing almirah.
Fiction almirah
Ek kitaab, ek subject. One book, one subject. In SQL, a book is a table. Click the glowing book.
The Alchemist
a book with many pages
Ek page, ek entry. One page, one entry. In SQL, each page is a row.

Har cheez ka apna thikana. Everything has its place. A database keeps all the data neatly organised, like a library keeps its books. We will go deeper later.

Think of a library: a place that keeps thousands of books, neatly organised, so any book can be found. A computer keeps data the same way, in a database: the library is the database, and the books are the data. Books are kept in almirahs, one topic in each, and in SQL an almirah is a schema. Each book covers one topic, and a book is a table. Inside the book are pages, and each page is a row. We will go deeper into all of this later in the course.

Click any part of the warehouse

Every part becomes a table

Warehouse
Floor 3
Floor 2
Floor 1
Gate
Tap a number, or press →
The warehouse you can see
On the left is a warehouse. On the right is what the database keeps about it. Click a part to connect the two.

Picture an Amazon warehouse with four floors. You order a microphone. The manager says "second floor, pick it up", it is packed, and a delivery person brings it to your home. You cannot walk in and grab it yourself (aap seedha andar ja ke utha nahi sakte). RetailMart records every one of those steps as a table:

The three words you need

Table, row, schema

🏢 salesschema
🏢 productsschema
🏢 customersschema (one floor)
customers.customers  (a table = one rack)
customer_idnamecity
Simple hai.Table = like an Excel sheetRow = one customerSchema = one floor, a group of related tables

A table is like an Excel sheet: columns across the top, and every line is one row. One customer is one row. A group of related tables is called a schema. In our warehouse, one floor is a schema and the racks on it are the tables.

RetailMart in numbers

A real business, not toy tables

16
schemas (floors)
55
tables (racks)
24 lakh
rows (about 2.4 million)
50,000 customers6,036 products200 stores 1.5 lakh orders3.75 lakh order linesJan 2024 to Feb 2026

Sounds like a lot? Ghabrana nahi hai. You will not memorise 55 tables. We start with six.

RetailMart has 16 schemas, 55 tables and about 24 lakh (2.4 million) rows: 50,000 customers, 6,036 products, 200 stores, 1,50,000 orders and 3,75,202 order lines, from January 2024 to February 2026. Don't worry about memorising 55 tables. Start with six and look up the rest when you need them, like a library catalogue.

Start here

Just six tables to begin

customerscustomers.customersorderssales.ordersorder_itemssales.order_itemsdim_regioncore.dim_regionstoresstores.storesproductsproducts.productsplaceshassold atis ain

Bas itni si kahani hai. A customer places an order. An order has items. Each item is a product. That is the whole story.

Start with these six: customers.customers, products.products, sales.orders, sales.order_items, stores.stores and core.dim_region. Orders connect customers to what they bought, and order items connect each order to its products. Open the full dataset explorer for the real ER diagram and search across all 55 tables.

One rule

Never change RetailMart

🔒
retailmart
Read-only. Look, don't touch.
🧪
practice
Yours. Create, break, experiment.

Dusre ka saaman mat chhedo. Don't disturb what isn't yours.

One rule: never change RetailMart's data. It is read-only. For your own experiments there is a separate database called practice, where you can create, break and fix as much as you like.

Let me show you

Your first query

SELECT * FROM customers.customers LIMIT 10;
→ the first 10 rows of the customers table

Chalo, pehli query. In plain words: show me everything from the customers table, just the first 10 rows.

Just a taste. Real practice happens on your own laptop.

The browser playground is only a taste. Real practice happens on your own laptop, and the next video shows how to set that up. The query is SELECT * FROM customers.customers LIMIT 10;, which means: show me everything from the customers table, just the first 10 rows.

Your turn

Which table would you open first, and why?

Tell me in the comments. Milte hain agli video mein. Next video: install PostgreSQL on your laptop, Mac and Windows.

sql.theshiraverse.com

Free SQL course, a real 55-table database, and a step-by-step setup guide for Mac and Windows. Join the WhatsApp Community, the Channel or Discord. More from Shiraj at theshiraverse.com.

→ / Space next   ← back   F fullscreen   H hide bars   N notes