1D0-541 practice question 22 of 25
Which relational algebraic operation is used to select specific columns (attributes) from a relation?
Full set: 128 questionsIn relational algebra, the Projection operation (denoted by π) is used to select a subset of attributes (columns) from a relation (table). It creates a new relation containing only the specified columns from the original relation, and duplicate rows are eliminated. For example, if a Customer relation has columns for ID, Name, and City, a projection on Name and City would produce a new table with just those two columns. This operation is fundamental for retrieving only the necessary data fields from a table, which is a common requirement in database queries.
A. Union: This operation combines all rows from two compatible relations into a single relation. It operates on rows, not columns.
B. Difference: This operation returns rows that exist in the first relation but not in the second. It is a set-based row operation.
D. Intersection: This operation returns only the rows that are present in both of the specified relations. It also operates on rows.
1. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2019). Database System Concepts (7th ed.). McGraw-Hill. In Chapter 2, Section 2.4.3 "The Projection Operation," it states, "The projection operation is a unary operation that returns its argument relation with certain attributes left out... The projection operation selects certain columns from a table and discards the other columns."
2. Ullman, J. D., & Widom, J. (2008). A First Course in Database Systems (3rd ed.). Pearson/Prentice Hall. Chapter 2, Section 2.3.2 "Projection," defines the operation as: "The projection operator, π, is used to produce from a relation a new relation that has a subset of the original relation’s columns."
3. Stanford University. (n.d.). CS145 Introduction to Databases, Relational Algebra. Retrieved from Stanford University courseware. In the section "Basic Operators," Projection (π) is defined as the operation that "selects columns from a relation." (https://web.stanford.edu/class/cs145/notes/relalg/relalg.html)
Keep practicing
Take the free 1D0-541 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1D0-541 practice questions
- Question 3To create a view, what are the minimal privileges that a user must have for the relations…
- Question 5Consider the following relation definitions: STUDENT( Student_Number: integer NOT NULL Na…
- Question 7Which subset of Structured Query Language (SQL) is used to limit access to a database or …
- Question 10Which statement accurately describes a characteristic of attributes?
- Question 11In a relational database, which term describes a single table consisting of rows and colu…
- Question 12Which of the following occurs in a relation when records are added or removed?
