Connect related tables to build complete pictures of your data. Joins are the most powerful tool in SQL — they let you answer questions that span multiple tables, like 'what did each customer order and how much did they spend?'
Examine how the e-commerce database splits data across tables and why you need joins to put it back together.
SELECT * FROM orders LIMIT 5;SELECT * FROM customers LIMIT 5;Notice that the orders table stores customer_id, not the customer's name or email. This is called normalization — storing each fact in one place to avoid duplication and inconsistency. If a customer changes their email, you update one row in customers rather than thousands of rows in orders. The trade-off is that you need JOINs to reassemble the full picture.
The orders table shows customer_id as a number, not a name. To see who placed each order, you need to look up that ID in the customers table.