When we use criteria to limit the number of rows that are displayed from a single table, we are using the relational operation known as a _________________ . Question 44 options: 1) project (projection) 2) join 3) select (selection) 4) product 5) difference
Question 44 options:
|
|
||
|
|
||
|
|
||
|
|
||
|
|
When we use criteria to limit the number of rows that are displayed from a single table, we are using the relational operation known as select (selection) operator.
Consider tables Student and Advisor.
Student ( sid, fname, lname, country, aid )
Advisor ( aid, fname, lname, dept )
SELECT operator
This operator is used to specify the condition which forms the basis of the output to be displayed.
Only those rows which satisfy the condition mentioned in this clause are displayed.
σ country = "USA" (Student)
This returns all the rows from Student table who have USA has their country.
1. PROJECT operator
This operator specifies the columns which are to be displayed in the output.
Only those columns which are mentioned with this operator are found in the result set.
Π fname, lname (Student)
The result contains columns fname and lname from Student table.
2. JOIN operator
This operator is used to join two tables at a time.
This operator is used when columns required in the output reside in different tables.
Only those tables can participate in join which have share a common column.
Student ⋈ Student.aid = Advisor.aid (Advisor)
This operation returns all rows from both tables where the value of aid in both the tables are same.
Step by step
Solved in 3 steps