Search Header Logo
SQL JOIN

SQL JOIN

Assessment

Presentation

Information Technology (IT)

University

Practice Problem

Easy

Created by

ARIEL GERONA

Used 6+ times

FREE Resource

20 Slides • 22 Questions

1

media

2

media

3

media

4

Multiple Choice

What is a table relationship?

1

A link between two tables based on shared values

2

A method to store data in one table

3

A way to visualize data

4

A type of database query

5

media

6

Multiple Choice

What does the one-to-one relationship between Students and ID Cards imply?

1

Each student can have multiple ID cards

2

Each ID card can belong to multiple students

3

Each student has exactly one ID card

4

ID cards are not linked to students

7

media

8

Multiple Choice

Which type of relationship allows one row in A to relate to many rows in B?

1

One-to-One

2

One-to-Many

3

Many-to-Many

4

None of the above

9

media

10

Fill in the Blanks

Type answer...

11

Multiple Choice

What is the purpose of a junction table in a many-to-many relationship?

1

To store primary keys only

2

To hold foreign keys and extra info about relationships

3

To create a one-to-one relationship

4

To eliminate redundancy in data

12

media

13

Fill in the Blanks

Type answer...

14

Fill in the Blanks

Type answer...

15

Fill in the Blanks

Type answer...

16

Fill in the Blanks

Type answer...

17

Fill in the Blanks

Type answer...

18

Fill in the Blanks

Type answer...

19

Multiple Choice

What is the purpose of a FOREIGN KEY in a database?

1

To create a new table

2

To enforce a link between tables

3

To delete data from a table

4

To update records in a table

20

media

21

Multiple Choice

What does referential integrity mean in the context of databases?

1

It allows any foreign key value in a child table.

2

It requires every foreign key value in a child table to match an existing primary key value in the parent table or be NULL.

3

It prevents the deletion of any section in the database.

4

It allows for orphan rows in the database.

22

media

23

Multiple Choice

What does the CASCADE action do in a database management system?

1

Automatically delete child rows

2

Block the operation if related child rows exist

3

Set foreign key in child rows to NULL

4

No action taken

24

media

25

Multiple Select

What are the steps in the process of designing related tables for multi-table databases? Select all possible correct answer.

1

List the Entities

2

Define Attributes

3

Pick a Primary Key

4

Identify Relationships

5

Add Foreign Keys

26

media

27

media

28

media

29

Multiple Choice

What is the purpose of a JOIN in SQL?

1

To combine rows from two or more tables

2

To delete rows from a table

3

To create a new table

4

To update existing rows

30

media

31

Multiple Choice

What does an INNER JOIN return in SQL?

1

Only rows with matching values in both tables

2

All rows from both tables

3

Only unmatched rows from both tables

4

Rows with NULL values

32

media

33

Multiple Choice

What does a LEFT JOIN return in SQL?

1

Only matched rows from both tables

2

All rows from the right table

3

All rows from the left table, plus matched rows from the right

4

Only rows with NULL values

34

media

35

Multiple Choice

What does a RIGHT JOIN return in SQL?

1

Only matched rows from both tables

2

All rows from the LEFT table

3

All rows from the RIGHT table, plus matched rows from the LEFT

4

Only rows with NULL values

36

media

37

media

38

media

39

Fill in the Blanks

Type answer...

40

Multiple Choice

In the provided SQL query, which table is joined to get the section name?

1

students

2

sections

3

enrollments

4

subjects

41

Multiple Choice

What SQL command is used to retrieve every student's name, the section they belong to, and the subjects they are enrolled in?

1

SELECT

2

JOIN

3

INNER JOIN

4

FROM

42

media
media

Show answer

Auto Play

Slide 1 / 42

SLIDE