Unit 4 - Advanced Database Commands Flashcards

1
Q

ALTER TABLE

A

A clause that changes the structure of a table.

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

Any and All

A

The ANY and ALL operators compare a value with a set of values returned by a subquery. These operators are particularly useful if you want to compare multiple values from a subquery without specifying each value explicitly.

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

CROSS JOIN

A

A clause in a query that creates a new table with the same number of rows as the product of the original table sizes.

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

Column Alias

A

An alternative name assigned to a column for use in a query’s result set.

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

DROP VIEW

A

A statement that deletes a view.

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

Deduplication

A

The removal of duplicates.

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

EXPLAIN

A

A command that provides insight into the query execution plan for a given SQL query.

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

FULL OUTER JOIN

A

A JOIN that retrieves all records from both tables, even if there is no matching record in the other table; the missing column entries appear as NULL.

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

Foreign Key

A

A column or set of columns that refers to the primary key of another table.

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

LEFT JOIN

A

A clause that combines data from two tables based on a specified condition. It retrieves all records from the left (or first) table and matching records from the right (or second) table. In the result set, any unmatched rows from the left table will have NULL values.

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

NATURAL JOINs

A

SQL JOINs based on columns with identical names in the related tables. They are easier to set up than other JOINs but can result in unintended connections when the tables share multiple common column names.

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

Node

A

A section of a query plan that describes a single operation within the query.

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

Outer Query

A

A query that uses the output of a subquery (inner query) as input.

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

Query Plan Node

A

The results of an EXPLAIN command, describing the cost of each operation in a query.

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

RIGHT JOIN

A

A clause that combines data from two tables based on a specified condition. It retrieves all records from the right (or second) table and matching records from the left (or first) table. In the result set, only matching rows from the left and right tables are included, and any unmatched rows from the right table will have NULL values.

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

Subquery

A

Also called an inner query, a query that is nested inside another query, so its results can be used as input for the outer query.

17
Q

Table Alias

A

An alternative name assigned to a table for use in a query’s result set.

18
Q

Union Operator

A

An operator that combines the results of two or more SELECT statements and removes duplicate rows.

19
Q

Venn Diagram

A

Venn diagrams illustrate logical relationships between two or more sets of items by using overlapping circles or shapes. In many cases, they serve as a visual way to summarize similar and different aspects of items.

20
Q

View

A

In a database, a view is the result set of a stored query, which can be queried like a persistent database collection object.

21
Q

Candidate key

A

A candidate key is not a specific type of constraint that can be set in a database. Instead, it is a set of attributes that uniquely identifies a table
record. A table could have multiple candidate keys, with one being set as the primary key for a table. However, any of those candidate keys could potentially have been
selected as the primary key. The candidate key would have all of the constraints similar to a primary key, but there may be better options to select as the primary key.

The properties of the candidate key include the following:
The column data should be unique.

The key can consist of multiple columns.

It should not contain any NULL values.

22
Q
A