Relational Algebra Flashcards

1
Q

Relational Algebra strikes a good balance between expressive ______ and _______

A

power and efficiency

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

The 3 standard set-theoretic binary operations are _____, ______, and _______ ________

A

union, difference, Cartesian product

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

2 unary operations on relations include ______ and _______

A

projection, selection

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

One special operation on relations is ______

A

renaming

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

A ________ π_(A1,…,An)(R) chooses columns

A

projection

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

A ________ σ_θ(R) chooses rows satisfying condition θ

A

selection

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

A domain of values must be totally _______ to use comparison operators

A

ordered

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

We use $4 when we do not have attribute names. What does this mean?

A

Select attribute 4 from a relation

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

It is more efficient to combine multiple _______

A

selections

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

It is more efficient to nest ______ within ______

A

selections, projections

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

The cardinality of R x S is…

A

card(R) * card(S)

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

The arity of R x S is…

A

arity(R) + arity(S)

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

A _________ ρA->A’ changes the name a an attribute

A

renaming

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

A _________ _____ |>

A

natural join

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

A _____ combines all tuples in set together into one table

A

union

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

An intersection return a table with tuple found in _____ relations

A

both

17
Q

A _______ A-B removes tuples find in B from A

A

difference

18
Q

R (intersect) S can be represented as …

A

R-(R-S)

19
Q

R |>

A

σ_θ(R×S)

20
Q

Equijoin is the same as ______ join but with a _______ of equalities

A

theta, conjunction

21
Q

R |>< θ S ==

A

π_X(R |>

22
Q

R -|>

A

R − (R |>

23
Q

The 6 primitive operations are…

A

projection, selection, Cartesian product, renaming, union, and difference

24
Q

A database query language is ___________ ________ if it is at least as expressive as relational algebra

A

relationally complete

25
Q

SELECT is the same as _____-

A

projection

26
Q

_______ is the same as cartesian product

A

FROM

27
Q

WHERE is the same as _______

A

selection