WEEK 3 Flashcards

(22 cards)

1
Q

Theoretical way of manipulating table contents using relational operators

A

Relational Algebra

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

Relvar: Variable that holds a relation
Heading contains the names of the attributes and the body contains the relation

A

Relvar: Variable that holds a relation
Heading contains the names of the attributes and the body contains the relation

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

Relational operators have the property of closure
Closure: Use of relational algebra operators on existing relations produces new relations

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

Relational operators have the property of closure
Closure: Use of relational algebra operators on existing relations produces new relations

A

Relational operators have the property of closure
Closure: Use of relational algebra operators on existing relations produces new relations

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

relational algebra = language to get the data / it is a procedural language

A

relational algebra = language to get the data / it is a procedural language

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

Relational Set Operators
Select (Restrict)
Unary operator that yields a horizontal subset of a table

Project
Unary operator that yields a vertical subset of a table

Union
Combines all rows from two tables, excluding duplicate rows
Union-compatible: Tables share the same number of columns, and their corresponding columns share compatible domains
Intersect
Yields only the rows that appear in both tables
Tables must be union-compatible to yield valid results

A

Relational Set Operators
Select (Restrict)
Unary operator that yields a horizontal subset of a table

Project
Unary operator that yields a vertical subset of a table

Union
Combines all rows from two tables, excluding duplicate rows
Union-compatible: Tables share the same number of columns, and their corresponding columns share compatible domains
Intersect
Yields only the rows that appear in both tables
Tables must be union-compatible to yield valid results

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

Unary operator that yields a horizontal subset of a table

A

Select (Restrict)

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

Unary operator that yields a vertical subset of a table

A

Project

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

Combines all rows from two tables, excluding duplicate rows
Union-compatible: Tables share the same number of columns, and their corresponding columns share compatible domains

A

Union

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

Yields only the rows that appear in both tables
Tables must be union-compatible to yield valid results

A

Intersect

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

Yields all rows in one table that are not found in the other table
Tables must be union-compatible to yield valid results

like the difference in set minus (-) / like how you minus in set

A

Difference

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

Tables share the same number of columns, and their corresponding columns share compatible domains

A

Union-compatible:

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

Yields all possible pairs of rows from two tables

A

Product

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

Uses one 2-column table as the dividend and one single-column table as the divisor
Output is a single column that contains all values from the second column of the dividend that are associated with every row in the divisor

A

Divide

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

Allows information to be intelligently combined from two or more tables

A

Join

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

Links tables by selecting only the rows with common values in their common attributes
Join columns: Common columns

A

Natural join:

16
Q

Links tables on the basis of an equality condition that compares specified columns of each table

17
Q

Extension of natural join, denoted by adding a theta subscript after the JOIN symbol (using any comparison except equality)

18
Q

Only returns matched records from the tables that are being joined

19
Q

Matched pairs are retained and unmatched values in the other table are left null

20
Q

Yields all of the rows in the first table, including those that do not have a matching value in the second table

A

Left outer join:

21
Q

Yields all of the rows in the second table, including those that do not have matching values in the first table

A

Right outer join: