Lecture

What are Joins?

In relational databases, tables are designed to focus on a single subject or entity, such as customers, orders, or courses. This avoids duplication and makes data easier to manage.

To answer real-world questions, however, you often need to bring those separate tables together.

This is where joins come in.


Joins in Context

Instead of storing everything in one large table, databases use a normalized design that breaks data into logical pieces.

  • students might store student profiles
  • enrollments might track which students joined which classes

These tables are related through a shared column, typically an ID.


Real-World Use Cases

Joins can be used to:

  • Show each customer along with their purchases
  • Combine user accounts with their login history
  • Match employees to their departments or roles

In short, joins unlock the full power of relational databases.

Quiz
0 / 1

What is the primary function of joins in relational databases?

Joins in relational databases are primarily used to separate tables to answer complex queries.
combine
delete
duplicate
index

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help