While selection operation works on rows, similarly projection operation of relational algebra works on columns Selection is also know as restrict, this operator yields values for all rows found in a table that satisfies given condition It basically allows us to pick specific columns from a given relational table.
Unit - 3 - Lecture 3 Combine Selection & Projection Operator and
Selection and projection are two major basic model operations that are used when processing queries in dbms
Although both are associated with the operation of a database, it is used.
Both are fundamental in sql and nosql databases, but they serve different purposes Selection = rows, projection = columns You can (and often should) use them together to refine queries efficiently. The most common kind of select statement uses both selection and projection
A query of this kind returns some of the rows and some of the columns in a table, as the following figure shows. What is the difference between projection and selection Think of selection as finding the right people in a room, and projection as asking them for specific details (like their names or ages) Together, they help you extract precise, useful data from databases.
Herbalessence's answer is totally correct, but the basic idea is
With the selection operator you specify which rows you want, with the projection operator you specify which columns you want. Learn the difference between selection and projection in dbms with simple examples Understand how these operations filter rows and columns in sql.