Multisets and aggregation Flashcards

1
Q

The multiplicity of an element describes its…

A

number of occurences

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

______ on bags keeps duplicates

A

projection

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

cartesian product on bags concatenates _______ as many times as they occur

A

tuples

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

selection takes all occurences of tuples satisfying the _______

A

condition

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

epsilon removes ______

A

duplicates

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

____ adds multiplicities

A

union

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

intersection takes the _______ multiplicity

A

minimum

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

difference ______ multiplicities up to zero

A

subtracts

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

SELECTα

A

πα(·)

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

SELECT DISTINCT α

A

ε(πα(·))

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

Q1 UNION ALL Q

A

Q1∪Q2

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

Q1 UNION Q2

A

ε(Q1∪Q2)

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

What are the 5 aggregate function in SQL?

A

COUNT, AVG, SUM, MIN, MAX

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

What does GROUP BY do?

A

groups all common entries

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

What is the order of evaluation in SQL (6 step)

A

FROM, WHERE, GROUP BY, AGGREGATES, HAVING, SELECT

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

Aggregate functions can only be used in ______ and ______

A

SELECT, HAVING

17
Q

What does LIKE’K____%’ mean?

A

begins with ’K’ and has at least 5 characters