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 23,91,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 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.
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, 1,21,106 rowscustomers: 5 tables, 2,05,000 rowssales: 5 tables, 7,80,104 rowsfinance: 6 tables, 1,83,947 rowshr: 2 tables, 1,24,310 rowsmarketing: 3 tables, 4,750 rowssupport: 1 table, 10,000 rowsweb_events: 2 tables, 7,00,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 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).
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.
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.
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.