Quiz 3 (Midterm) Flashcards

1
Q

Projection

A

A subset of columns. Denoted by Proj (π)

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

Selection

A

A subset of rows. SELECT (σ)

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

Union

A

A logical ‘or’ used to compare or combine two sets of data. Both sets MUST have the same schema.

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

Intersection

A

A logical ‘and’ used to compare or combine two sets of data. Both sets MUST have the same schema.

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

Set-difference

A

What is not common between the two sets. What’s in one and not the other.

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

Cross-product

A

Joining (multiplying) two sets together.
If the rows in Student are row1, row2 and row3, and the rows in University are row4, row5 and row6, then the cartesian product will contain

row1row4, row1row5, row1row6, row2row4, row2row5, row2row6, row3row4, row3row5, row3row6

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

Join

A

Cross product followed by a selection and then maybe a projection. (⋈)

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

Division

A

Division identifies the attribute values from a relation that are found to be paired with all of the values from another relation.

Used when you need to find the values that do not belong in the answer, and remove them from the list of possible answers. Opposite of cross/cartesian product.

  1. Compute all possible attribute pairings
  2. Remove the existing pairings
  3. Remove the non–answers from the possible answers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Relational Algebra vs. Relational Calculus

A

Algebra is procedural in that it gives the steps to get the result. Calculus is declarative in that it gives you the result so that you can find the steps.

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

Relational Calculus Format

A

{T | p(T)} where p(T) is a recursively defined formula and is true for all T

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