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.
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.
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.
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 rowsstores: 3 tables, 23,200 rowsproducts: 4 tables, 121,106 rowscustomers: 5 tables, 205,000 rowssales: 5 tables, 780,104 rowsfinance: 6 tables, 183,947 rowshr: 2 tables, 124,310 rowsmarketing: 3 tables, 4,750 rowssupport: 1 table, 10,000 rowsweb_events: 2 tables, 700,000 rowssupply_chain: 3 tables, 38,505 rowsloyalty: 3 tables, 40,004 rowsmanufacture: 2 tables, 15,010 rowspayroll: 2 tables, 12,006 rowscall_center: 2 tables, 50,000 rowsaudit: 6 tables, 82,700 rows| Column | Type |
|---|---|
| customer_id | int |
| first_name | varchar(50) |
| last_name | varchar(50) |
| varchar(100) | |
| phone | varchar(20) |
| registration_date | date |
| tier | varchar(20) |
| tier_updated_at | timestamp |
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).
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.
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).
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;
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.