# Joins and relationships

> An operation combining rows according to a relationship condition.

Course: [SQL and relational databases](https://studybrix.com/en/courses/sql-databases/index.md)
Level: university
Prerequisites: Basic computing and simple data tables.

## Notes

### Join

An operation combining rows according to a relationship condition.

### One-to-many

A relationship where one row can correspond to several rows in another table.

### Inner join

A join returning rows with matches under the join condition.

### Left join

A join retaining all rows from the left side plus matching right-side rows.

## Practice questions

### 1. Which term best matches this description: An operation combining rows according to a relationship condition.

A. One-to-many
B. Join
C. Left join
D. Inner join

Answer: Join

Explanation: Join is the matching concept in this lesson.

### 2. Which term best matches this description: A relationship where one row can correspond to several rows in another table.

A. Left join
B. Join
C. Inner join
D. One-to-many

Answer: One-to-many

Explanation: One-to-many is the matching concept in this lesson.

### 3. Which concept would you apply first in a situation where a join returning rows with matches under the join condition.

A. Left join
B. Inner join
C. One-to-many
D. Join

Answer: Inner join

Explanation: The scenario directly calls for Inner join.

### 4. Name the concept described as: A join retaining all rows from the left side plus matching right-side rows.

Answer: Left join

Explanation: The intended concept is Left join.

### 5. Which statement about Join is most accurate?

A. An operation combining rows according to a relationship condition.
B. A join retaining all rows from the left side plus matching right-side rows.
C. A join returning rows with matches under the join condition.
D. A relationship where one row can correspond to several rows in another table.

Answer: An operation combining rows according to a relationship condition.

Explanation: The definition in the lesson notes gives the required condition.

### 6. Explain one important difference between Join and One-to-many.

Sample answer / marking guidance: Join: An operation combining rows according to a relationship condition. One-to-many: A relationship where one row can correspond to several rows in another table.

Explanation: Credit a clear distinction using both definitions and an appropriate example if supplied.

### 7. Give a short example showing how Inner join would be used in practice.

Sample answer / marking guidance: A valid example should demonstrate this idea: A join returning rows with matches under the join condition.

Explanation: Credit a relevant scenario that applies the concept rather than merely naming it.

### 8. Summarize why Left join matters in the lesson “Joins and relationships”.

Sample answer / marking guidance: Left join matters because A join retaining all rows from the left side plus matching right-side rows.

Explanation: Credit the core purpose, scope and any important limitation from the notes.

## Further reading

- https://www.postgresql.org/docs/

Original AI-assisted educational draft; not independently teacher-reviewed. References support further study, not copied exercises, affiliation or curriculum accreditation.
