← Get startedSELECT * FROM Shiraverse · 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 the video

Tour the database

A tour of RetailMart

16
schemas (almirahs)
55
tables (books)
24 lakh
rows in total (2,391,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 2,391,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 all the tables, real sample data and an ER diagram (a map of how tables connect), with search. 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, 121,106 rows
  • customers: 5 tables, 205,000 rows
  • sales: 5 tables, 780,104 rows
  • finance: 6 tables, 183,947 rows
  • hr: 2 tables, 124,310 rows
  • marketing: 3 tables, 4,750 rows
  • support: 1 table, 10,000 rows
  • web_events: 2 tables, 700,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 any table 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

The map of connections

πŸ—ΊοΈ
ER diagramhow tables connect
πŸ”Ž
Searchfind any table or column
πŸ”‘
KeysPK and FK on every table

The full diagram is big, and that is fine. Use search, and look at one table at a time.

The explorer also has an ER diagram, a map of how tables connect. It is large, so do not try to read it all at once. Use the search box to find a table, then look at its neighbours. Each table shows its PK (primary key, the unique id) and FK (foreign key, the link to another table).

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;
Your turn

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.

Free SQL course and the Setup page, which maps every step. Join the WhatsApp Community, the Channel or Discord.

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