Relational Algebra
- 77Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
77 questions
- 1Relational algebra is a_____data manipulation language for the relational model.
Hint
It specifies how data should be retrieved, not only what data is wanted.
Answer
procedural
- 2A relational algebra operation takes one or two relations as input and produces a new_____as its result.
Hint
The result has the same general form as a database table.
Answer
relation
- 3Multiple relational algebra operations combined together form a relational algebra_____.
Hint
It is a combination of operations that can be evaluated as a query.
Answer
expression
- 4In relational algebra, the operands are relations or variables that represent_____.
Hint
They are the data objects on which operators act.
Answer
relations
- 5Relational algebra operators map relations to_____.
Hint
The output of an operator remains a valid relational structure.
Answer
relations
- 6A tuple is an immutable ordered sequence of_____.
Hint
A tuple corresponds to a row and contains ordered data items.
Answer
values
- 7A relation is a group of tuples and is equivalent to a_____in a relational database.
Hint
It is organized into rows and attributes.
Answer
table
- 8An attribute is a field in a relation or_____.
Hint
It corresponds to a column.
Answer
table
- 9A domain specifies the data type of values permitted for a given_____.
Hint
It restricts what kind of values a column may contain.
Answer
attribute
- 10The four main categories of relational algebra operations are set, unary, binary, and_____operations.
Hint
This category includes generalized projection, aggregation, and outer join.
Answer
extended
- 11Set operations are binary operations because they operate on_____relations.
Hint
The opposite category discussed later operates on only one relation.
Answer
two
- 12The four set operations are union, intersection, set difference, and_____product.
Hint
This operation pairs every tuple in one relation with every tuple in another.
Answer
Cartesian
- 13The union of relations r and s contains tuples from_____relation.
Hint
Union combines the contents of its two inputs.
Answer
both
- 14Duplicate tuples are_____when a union operation is performed.
Hint
Set operations do not retain repeated copies of the same tuple.
Answer
eliminated
- 15For union, the input relations must be_____compatible.
Hint
The compatibility requirement is named after the operation.
Answer
union
- 16If relations r and s are union compatible, the degree of r∪s equals the degree of_____.
Hint
Union does not add columns; it combines tuples with matching structures.
Answer
relations r and s
- 17The intersection of r and s contains tuples that belong to_____relations.
Hint
Think of the overlap between two sets.
Answer
both
- 18Like union, intersection requires the two relations to be_____compatible.
Hint
The inputs must have matching degrees and corresponding domains.
Answer
union
- 19In the example, the intersection of the writers and clients relations contains only_____.
Hint
It is the only record appearing in both relations.
Answer
John Cena
- 20The set difference r−s returns tuples that belong to r but_____belong to s.
Hint
Difference removes tuples found in the second relation.
Answer
do not
- 21Unlike union and intersection, the_____of operands affects the result of set difference.
Hint
Switching the first and second relations changes which tuples are removed.
Answer
order
- 22The Cartesian product concatenates each tuple from r with_____tuple from s.
Hint
Each tuple in the first relation is paired with all tuples in the second.
Answer
every
- 23The degree of r×s equals the_____of the degrees of r and s.
Hint
The attributes from both relations are combined.
Answer
sum
- 24If both input relations have four attributes, their Cartesian product has_____attributes.
Hint
Add the two degrees together.
Answer
eight
- 25Unlike union, intersection, and set difference, Cartesian product does not require the relations to be_____compatible.
Hint
The input relations may have different structures.
Answer
union
- 26The number of tuples in a Cartesian product equals the_____of the numbers of tuples in the two input relations.
Hint
Every tuple in one relation is paired with every tuple in the other.
Answer
product
- 27Unary operations take only_____input relation and also produce one relation.
Hint
The prefix uni- means single.
Answer
one
- 28The four unary operations presented are select, projection, rename, and_____.
Hint
This operation stores an intermediate result in a temporary variable.
Answer
assignment
- 29The select operation returns the subset of tuples that satisfies a selection_____.
Hint
It tests rows against a logical or comparison requirement.
Answer
condition
- 30Selection is called the_____filter because it selects rows and discards other rows.
Hint
Rows extend across a table.
Answer
horizontal
- 31Selection conditions may use comparison operators as well as AND, OR, and_____.
Hint
This operator is commonly used for pattern matching in text.
Answer
LIKE
- 32The projection operation returns tuples containing a subset of the original relation's_____.
Hint
Projection chooses columns rather than rows.
Answer
attributes
- 33Projection is called the_____filter because it selects columns.
Hint
Columns extend vertically in a table.
Answer
vertical
- 34To retrieve only first names from the actors relation, projection selects the_____attribute.
Hint
The query is intended to return a single name field.
Answer
first name
- 35The rename operation can rename a relation, its attributes, or_____.
Hint
It supports changing either kind of name independently or together.
Answer
both
- 36In the example, renaming the directors relation changes its relation name to_____.
Hint
The new name describes a different role in film production.
Answer
producers
- 37Assignment stores an intermediate query result in a temporary_____variable.
Hint
The assigned result can be used as an input to later operations.
Answer
relation
- 38Assignment expresses a complex query as a sequential program of assignments followed by an_____whose value is displayed.
Hint
The final operation determines the query output.
Answer
expression
- 39In the example, actors with gender equal to M are assigned to the temporary variable_____.
Hint
The variable name describes the selected group.
Answer
male actors
- 40A binary operation combines_____input relations into one output relation.
Hint
Binary means involving a pair.
Answer
two
- 41The four binary operations presented are data join, equi-join, natural join, and_____.
Hint
This operation returns tuples associated with every tuple in another relation.
Answer
division
- 42A data join combines two relations based on a condition represented by the Greek letter_____.
Hint
The operation is also called a conditional join and uses comparison conditions.
Answer
theta
- 43A data join using only the equivalence condition is called an_____.
Hint
The prefix indicates equality.
Answer
equi-join
- 44In an equi-join, tuples are matched when the selected attributes have_____values.
Hint
The condition is based on the equals operator.
Answer
equal
- 45A natural join requires at least one_____attribute between the two relations.
Hint
The matching attribute must appear in both relations.
Answer
common
- 46The common attributes in a natural join must have the same name and_____.
Hint
Matching columns must permit the same type of values.
Answer
domain
- 47Natural join performs selection based on equality of common attributes and eliminates the_____attribute.
Hint
The shared column should not appear twice in the result.
Answer
duplicate
- 48Attributes used in the division operation are not included in the_____.
Hint
The output keeps the attributes identifying the qualifying tuples.
Answer
result
- 49In the laptop divided by PC example, the resulting attributes are model and_____.
Hint
The speed attribute is used for division and is therefore omitted.
Answer
price
- 50Generalized projection extends ordinary projection by allowing_____functions in the projection list.
Hint
These functions can calculate new values from attributes.
Answer
arithmetic
- 51In generalized projection, the expression E represents a relational algebra_____.
Hint
It identifies the relation or operation being projected.
Answer
expression
- 52To calculate credit consumed, the credit company's generalized projection subtracts credit balance from credit_____.
Hint
The amount available minus the amount already owed gives the remaining difference.
Answer
limit
- 53Aggregate functions take a collection of values as input and return a_____value.
Hint
Aggregation summarizes multiple values.
Answer
single
- 54The aggregate operations presented are sum, average, count, min, and_____.
Hint
It returns the greatest value in a collection.
Answer
max
- 55In the department salary example, the department is used as the_____attribute.
Hint
It determines how employees are grouped before salaries are totaled.
Answer
group
- 56The aggregation example uses the_____function to calculate total salary.
Hint
The goal is to add all salaries within each department.
Answer
sum
- 57An outer join differs from an ordinary join by retaining unmatched tuples and padding missing values with_____.
Hint
This special database value represents unavailable data.
Answer
null
- 58The three variations of outer join are left outer join, right outer join, and_____outer join.
Hint
This variation preserves tuples from both sides.
Answer
full
- 59A left outer join keeps all tuples from the_____relation.
Hint
The name identifies which side is preserved.
Answer
left
- 60A right outer join keeps all tuples from the_____relation.
Hint
The preserved side corresponds to the operation's name.
Answer
right
- 61A full outer join keeps tuples from_____relations.
Hint
Neither side is discarded, even when there is no match.
Answer
both
- 62In the square-and-cube example, a left outer join includes number 4 with a null value for its_____.
Hint
Number 4 exists in the relation containing square values but not in the other relation.
Answer
cube
- 63In the same example, a right outer join includes number 5 with a null value for its_____.
Hint
Number 5 exists in the cube relation but not in the square relation.
Answer
square
- 64A full outer join can place null values on_____relations for unmatched tuples.
Hint
It preserves unmatched records from either input.
Answer
both
- 65Outer union is similar to union but also considers common attributes that are not necessarily_____compatible.
Hint
The issue concerns whether corresponding attributes use compatible data types.
Answer
type
- 66Outer union is equivalent to a full outer join using the_____attributes.
Hint
The join is based on attributes shared by both relations.
Answer
common
- 67In an outer union, common columns are_____into one column.
Hint
The duplicate representation of shared attributes is combined.
Answer
merged
- 68Outer union places null values in fields corresponding to_____data.
Hint
These fields have no value because the attribute is absent in one input.
Answer
non-existing
- 69In the outer union example, the increment column receives_____instead of null because it has a defined data type.
Hint
This is the numeric default shown for missing integer data.
Answer
zero
- 70To make two relations union compatible, a projection can be used to select matching attributes such as id, first name, and_____name.
Hint
The three selected attributes identify a person.
Answer
last
- 71In the exercise, the list of clients who are administrators can be obtained by combining selection with a_____operation.
Hint
The exercise asks students to find an operation or combination of operations that produces the desired list.
Answer
set
- 72The exercise asking for admins who are not writers requires the_____operation to exclude writers.
Hint
This operation keeps tuples in the first relation that are absent from the second.
Answer
set difference
- 73The challenge asks for the number of movies made by each director whose movie rank is at least_____.
Hint
The challenge specifies a threshold using an equality-or-greater condition.
Answer
8
- 74The challenge restricts the movies to those shown between 1960 and the year_____.
Hint
The time interval ends at the beginning of the twenty-first century.
Answer
2000
- 75The challenge requires grouping the qualifying movies by_____to count the number made by each one.
Hint
The result should report a movie count for each person responsible for directing.
Answer
director
- 76The exercise using generalized projection asks for the total cost of each laptop after adding a delivery charge of_____pesos.
Hint
The fixed charge is added to every laptop's cost.
Answer
200
- 77The binary-operation exercise asks for PCs that are more_____than a laptop.
Hint
The comparison concerns the monetary price of the two products.
Answer
expensive

Ask anything
We've read this whole study set, so questions about it get the best answers.