Week 5 Flashcards

(29 cards)

1
Q

What is relational algebra useful for?

A

understanding DBMSs internals

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

What is relational calculus useful for?

A

understanding SQL

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

What is relational calculus?

A

lets users describe what they want, instead of how to compute it

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

What is relational algebra?

A

useful for representing execution plans

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

What are some benefits of learning relational algebra?

A

foundational knowledge in databases, query optimization, better data manipulation

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

What are operands?

A

variables or values from which new values can be constructed

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

What are operators?

A

symbols denoting procedures that construct new values from given values

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

What are relational algebra operands?

A

relations or variables that represent relations

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

What are relational algebra operators?

A

common things that we need to do with relations in a database

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

What is the result of relational algebra?

A

algebra that can be used as a query language for relations

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

What do DBMSs use relational algebra expressions to represent?

A

query evaluation plans

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

What is core relational algebra?

A

set semantics

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

What is extended relational algebra?

A

bag semantics

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

What do DB systems implement?

A

bag semantics

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

What is selection in RA?

A

picking certain rows

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

What is projection in RA?

A

picking certain columns

17
Q

What is a cartesian product in RA?

A

compositions of relations

18
Q

What is rename in RA?

A

renaming of relations and attributes

19
Q

What does set semantics do to duplicates?

A

eliminates them

20
Q

What does bag semantics do to duplicates?

21
Q

Join = ???

A

Cross-product + Selection

22
Q

What is a theta join?

A

a join that involves a predicate

23
Q

What is an equijoin?

A

a case of theta-join where the join condition consists solely of equalities

24
Q

What is a theta join?

A

join of r and s with a join condition C

25
What is a natural join?
equality on all fields with same name in R and in S
26
What is the precedence of operators from highest to lowest?
unary, cartesian, intersection, and union/set difference
27
What is an outer join?
keeps all pieces of information from the operands
28
What is SQL in summary?
a declarative language where we say what data we want to retrieve
29
What is RA in summary?
an algebra where we say how we want to retrieve the data