Week 6 Flashcards

Relational Algebra and relational calculus

1
Q

A high-level declarative language for specifying relational queries.

A

relational calculus

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

A ____ operation operates on single relations.

A

unary

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

A ___ operation operates on two tables by combining related tuples (records) based on join conditions.

A

binary

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

An operation that can summarize data from tables, as well as additions types of Join and Union operations.

A. Relational operation
B. Functional operation
C. Aggregate functions

A

C. Aggregate functions

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

What operation is used to choose a subset of tuples from a relation that satisfies a specific condition?

A

SELECT

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

The SELECT operation is ____; it can be applied in any order.

A. strict
B. commutative
C. transitive

A

B. commutative

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

What operation is used to choose columns from a table?

A

PROJECT

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

The sigma (σ) symbol is used for what operation?

A. select
B. project
C. union

A

A. select

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

The pi (π) symbol is used for what operation?

A. select
B. project
C. union

A

B. project

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

T/F: the PROJECT operation removes duplicate tuples if the attribute list includes only nonkey attributes.

A

True

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

The rho (ρ) symbol is used for what operation?

A. select
B. project
C. rename

A

C. rename

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

The ___ operation is used to change the name of an intermediate operation. It is used with using the (TABLE)

A

RENAME

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

In SQL, the ____ operation is used by using DISTINCT in a SELECT query.

A

PROJECT

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

in SQL, AS is used as the ____ operation.

A

RENAME

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

The operation that includes all tuples that are in X or Y, or in both X and Y. Duplicates are eliminated. (X ∪ Y)

A. UNION
B. INTERSECTION
C. SET DIFFERENCE

A

A. UNION

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

The operation that includes only the tuples that are in both X and Y. (X ∩ Y)

A. UNION
B. INTERSECTION
C. SET DIFFERENCE

A

B. INTERSECTION

17
Q

The result of tuples that are in X but not in Y. (X - Y)

A. UNION
B. INTERSECTION
C. SET DIFFERENCE

A

C. SET DIFFERENCE

18
Q

UNION and INTERSECTION are ____ operations. Meaning the operation returns the same values whether it is X ∪ Y or Y ∪ X

A

commutative

19
Q

The _____ operation is denoted by X. It produces a new element by combining every tuple from one relation with every tuple from another relation.

A

CARTESIAN PRODUCT (CROSS PRODUCT)

20
Q

What operation is used to combine related tuples from two relations into a single longer tuple?

A

JOIN

21
Q

The ⋈ symbol is used for what operation?

A

JOIN

22
Q

A ___ JOIN requires that the two join attributes have the same name in both relations.

A. natural
B. theta
C. equi

A

A. natural

23
Q

This operation is applied to two relations where the attributes of S are a subset of the attributes of R. ( R(Z) ÷ S(X) )

A

DIVISION

24
Q

T/F: A generalized projection operation is used to compute values for a report.

A

True

25
Q

A(n) ____ is a mathematical operation applied to a collection of numeric values (SUM, AVERAGE, MAXIMUM, MINIMUM)

A

aggregate function