← Get startedSELECT * FROM TheShiraverse · All Nukte
Get started › Tour the database

Tour the RetailMart database

A beginner tour of the practice database: 16 schemas, 55 tables and about 24 lakh rows, using the free database explorer on this website.

Jo video mein bola, yahan nukte mein likha hai.
What I said in the video, written here as key points.

▶ Watch on YouTube

A tour of RetailMart

16
schemas (almirahs)
55
tables (books)
24 lakh
rows in total (23,91,602)

Ghabrana nahi hai. We start with just six.

RetailMart is a realistic retail business: stores, products, customers, orders, payments, deliveries, returns and more. It has 16 schemas, 55 tables and 23,91,602 rows in total. This page tours it, using the free database explorer on this website. No coding yet.

Step 1 · Open the database explorer

sql.theshiraverse.com/dataset
Free, and it works right now. No sign-in.

Bina install kiye bhi dekh sakte ho. You can look around even before you install anything.

Open sql.theshiraverse.com/dataset. It shows the 16 schemas as almirahs (cupboards). Click an almirah and its doors swing open to show the tables inside as books. Open a book to see its columns, real rows and a small map of how it connects to other tables. There is a search box, and a switch between the Antique and Modern looks. You do not need to install anything to use it.

Step 2 · The 16 schemas

core6 tablesstores3 tablesproducts4 tablescustomers5 tablessales5 tablesfinance6 tableshr2 tablesmarketing3 tablessupport1 tableweb_events2 tablessupply_chain3 tablesloyalty3 tablesmanufacture2 tablespayroll2 tablescall_center2 tablesaudit6 tables

Each schema is an almirah: one topic, kept together.

A schema groups related tables, like an almirah keeps one topic together. RetailMart has 16: core, stores, products, customers, sales, finance, hr, marketing, support, web_events, supply_chain, loyalty, manufacture, payroll, call_center, audit.

  • core: 6 tables, 960 rows
  • stores: 3 tables, 23,200 rows
  • products: 4 tables, 1,21,106 rows
  • customers: 5 tables, 2,05,000 rows
  • sales: 5 tables, 7,80,104 rows
  • finance: 6 tables, 1,83,947 rows
  • hr: 2 tables, 1,24,310 rows
  • marketing: 3 tables, 4,750 rows
  • support: 1 table, 10,000 rows
  • web_events: 2 tables, 7,00,000 rows
  • supply_chain: 3 tables, 38,505 rows
  • loyalty: 3 tables, 40,004 rows
  • manufacture: 2 tables, 15,010 rows
  • payroll: 2 tables, 12,006 rows
  • call_center: 2 tables, 50,000 rows
  • audit: 6 tables, 82,700 rows

Step 3 · Open one table

customers.customers · 50,000 rows
ColumnType
customer_idint
first_namevarchar(50)
last_namevarchar(50)
emailvarchar(100)
phonevarchar(20)
registration_datedate
tiervarchar(20)
tier_updated_attimestamp

A table is a book. The columns are its headings. Ek topic, ek table.

Click an almirah, then click any table (book) on its shelf to see its columns and a few real rows. For example customers.customers has 50,000 rows and these columns: customer_id (int), first_name (varchar(50)), last_name (varchar(50)), email (varchar(100)), phone (varchar(20)), registration_date (date), tier (varchar(20)), tier_updated_at (timestamp).

Step 4 · Just six tables to begin

customers.customers50,000 rowsproducts.products6,036 rowssales.orders150,000 rowssales.order_items375,202 rowsstores.stores200 rowscore.dim_region20 rows

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

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.

Step 5 · See how tables connect

πŸ—ΊοΈ
A map on every tableonly the tables it connects to
πŸ”Ž
Searchfind any table or column
πŸ”‘
KeysPK and FK on every table

Each table page has a small map. Left: what it points to. Right: what points to it.

Every table page in the explorer has a small map of only the tables it connects to. Tables it points to are on the left, and tables that point to it are on the right. Click any box to jump to that table. Each table also shows its PK (primary key, the unique id) and FK (foreign key, the link to another table). Some tables, such as the audit logs, have no declared links.

Step 6 · Try a first query

Playground– □ ×
sql> SELECT * FROM customers.customers LIMIT 10; → the first 10 rows of the customers table

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

Open the playground to run a query in your browser. It is a quick taste only. Real practice happens on your own laptop.

SELECT * FROM customers.customers LIMIT 10;

Which table would you open first, and why?

sql.theshiraverse.com

Tell me in the comments. Milte hain agli video mein. Next: a walkthrough of this whole website.

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