Week 6 Flashcards
Relational Algebra and relational calculus
A high-level declarative language for specifying relational queries.
relational calculus
A ____ operation operates on single relations.
unary
A ___ operation operates on two tables by combining related tuples (records) based on join conditions.
binary
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
C. Aggregate functions
What operation is used to choose a subset of tuples from a relation that satisfies a specific condition?
SELECT
The SELECT operation is ____; it can be applied in any order.
A. strict
B. commutative
C. transitive
B. commutative
What operation is used to choose columns from a table?
PROJECT
The sigma (σ) symbol is used for what operation?
A. select
B. project
C. union
A. select
The pi (π) symbol is used for what operation?
A. select
B. project
C. union
B. project
T/F: the PROJECT operation removes duplicate tuples if the attribute list includes only nonkey attributes.
True
The rho (ρ) symbol is used for what operation?
A. select
B. project
C. rename
C. rename
The ___ operation is used to change the name of an intermediate operation. It is used with using the (TABLE)
RENAME
In SQL, the ____ operation is used by using DISTINCT in a SELECT query.
PROJECT
in SQL, AS is used as the ____ operation.
RENAME
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. UNION
The operation that includes only the tuples that are in both X and Y. (X ∩ Y)
A. UNION
B. INTERSECTION
C. SET DIFFERENCE
B. INTERSECTION
The result of tuples that are in X but not in Y. (X - Y)
A. UNION
B. INTERSECTION
C. SET DIFFERENCE
C. SET DIFFERENCE
UNION and INTERSECTION are ____ operations. Meaning the operation returns the same values whether it is X ∪ Y or Y ∪ X
commutative
The _____ operation is denoted by X. It produces a new element by combining every tuple from one relation with every tuple from another relation.
CARTESIAN PRODUCT (CROSS PRODUCT)
What operation is used to combine related tuples from two relations into a single longer tuple?
JOIN
The ⋈ symbol is used for what operation?
JOIN
A ___ JOIN requires that the two join attributes have the same name in both relations.
A. natural
B. theta
C. equi
A. natural
This operation is applied to two relations where the attributes of S are a subset of the attributes of R. ( R(Z) ÷ S(X) )
DIVISION
T/F: A generalized projection operation is used to compute values for a report.
True
A(n) ____ is a mathematical operation applied to a collection of numeric values (SUM, AVERAGE, MAXIMUM, MINIMUM)
aggregate function