Questions tagged [projection]

4 questions
19
votes
2 answers

How mongoDB projection affects performance?

From MongoDB documentation it is mentioned that: When you need only a subset of fields from documents, you can achieve better performance by returning only the fields you need How filtering fields affect performance? Is the performance related…
Alireza
  • 3,586
  • 10
  • 35
  • 43
2
votes
0 answers

Relational Algebra: how to express the combination of aggregation and projection?

Here I have a table, I would like to query the average salary of departments, the SQL statement should be select dept_name, avg(salary) from employee I try to express this SQL in relational algebra. My assumption is as follows. You can see that…
0
votes
1 answer

How can I reference column aliases from a projection inside the projection?

Calculations on the projection (select) values are useful and common. Yet column aliases declared in the projection can't be used there. select sellprice as x, cost as y, x/y as markup from mytable gives an error. I can accomplish this…
Joshua Fox
  • 103
  • 4
0
votes
1 answer

How to represent NULL in relational algebra?

In the 3rd part of the question below: Study the tables given below and write relational algebra expressions for the queries that follow. STUDENT(+ROLLNO, NAME, AGE, GENDER, ADDRESS, ADVISOR) COURSE(+COURSEID, CNAME, CREDITS) PROFESSOR(+PROFID,…