Keys, Operators Flashcards

1
Q

Primary Key

A

a unique identifier for each record (or row) in a database table. It’s a special column (or a set of columns) that has a unique value for every entry, ensuring that each row can be distinguished from the others.

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

Simple Primary Key

A

a primary key that consists of only one column, which uniquely identifies each row in a table.

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

Composite Primary Key

A

a primary key made up of more than one column. Together, these columns create a unique identifier for each row in a table.

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

Foreign Key Constraint

A

a safety check that makes sure links between tables are accurate and valid, preventing errors in data relationships.

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

Foreign Key Constraint

A

a safety check that makes sure links between tables are accurate and valid, preventing errors in data relationships.

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

Between Operator

A

selects values within a given range. The values can be numbers, text, or dates.

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

Like operator

A

Used in a WHERE clause to search for a specified pattern in a column; % and _

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

ORDER BY

A

is used to sort the result-set in ascending or descending order.

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

JOINS

A

a way to combine rows from two or more tables based on a related column between them. It allows you to pull together data that’s spread across different tables into one combined result.

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

INNER JOIN

A

combines rows from two tables where there is a matching value in a specific column in both tables. It only shows results where there’s a match in both tables.

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

FULL JOIN

A

brings together everything from both tables, showing all matches and including any rows that don’t match.

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

LEFT join

A

includes everything from the left table and only matching data from the right table, with empty spots if there’s no match.

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

RIGHT join

A

includes everything from the right table and only matching data from the left table, with empty spots if there’s no match.

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

Equijoin

A

compares columns of two table with the = operator

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

non-equijoin

A

compares columns with < and >

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

self-joins

A

when a table is joined with itself. This is useful when you want to compare rows within the same table.

17
Q

Cross-join

A

combines every row from one table with every row from another table, creating all possible combinations.

18
Q
A