JOINs Flashcards

1
Q

Data Query Language (DQL):

A

primary command is SELECT, which is used to fetch data from a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Data Manipulation Language (DML)

A

inserting, updating, deleting, and managing data within database objects. The core commands are INSERT,
UPDATE, and DELETE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data Definition Language (DDL):

A

defining and modifying the database structure or schema. Includes commands like CREATE, ALTER, and DROP which can be used to create, alter, and delete databases and their objects (like tables, indexes, constraints, etc.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data Control Language (DCL):

A

controlling access to the data in the database. Commands such as GRANT and REVOKE are used to manage
database security and user permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SELECT statement

A

retrieve data from a database. I

SELECT statement can be used with other clauses like WHERE, GROUP BY,
HAVING, ORDER BY to filter, sort, group or make calculations with data (

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SELECT

A

Returns the final data (as functionality not display)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

FROM …
JOIN

A

Chose and JOIN tables to get base data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

GROUP BY

A

Aggregates the base data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

HAVING

A

Filters the aggregated data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

JOIN

A

operation that combines rows from two or more tables based on a related column between them (The PKs/FKs).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

INNER JOIN:

A

a simple JOIN, it returns rows when there is a match in both tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

LEFT JOIN:

A

Returns all rows from the LEFT TABLE and the matched rows from the RIGHT
TABLE. If no match is found, the result is NULL on the right side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Right Join

A

Returns all rows from the RIGHT TABLE and the matched rows from the LEFT
TABLE. If no match is found, the result is NULL on the left side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

FULL JOIN

A

Returns rows when there is a match in one of the tables. If there is no match, the result is NULL on either side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SELF JOIN:

A

self join is a regular join, but the table is joined with itself.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

CROSS JOIN:

A

returns the CARTESIAN product of rows from both tables.