Thuta Learning
AdvancedData & Databasesbeginner

JOINs Intro

Relax. We'll talk through this in plain words — no textbook voice.

JOIN is used to read two or more tables together based on a column that connects them. Real databases don't cram all their data into a single table. Customer data lives in the Customers table, order data lives separately in the Orders table, and you join them together whenever you need to.

Why keep them separate?

It cuts down on duplicated data, makes updates easier, and keeps relationships consistent. For example, instead of repeating the customer name on every single order, you just store the CustomerID, then join to pull in the customer name whenever you need it.

sql
-- Orders table နမူနာ
-- OrderID | CustomerID | OrderDate
-- 10308   | 2          | 1996-09-18
-- 10309   | 3          | 1996-09-19
You should see
Important things to notice: Orders.CustomerID is connected to Customers.CustomerID. That's the column you use as a bridge whenever you want to show an order alongside the customer's name.
JOINs Intro | Thuta Learning