RESTful API for tracking student data and student grades. Built with JavaScript and Node, using a MongoDB database with Mongoose object-data mapping, Express for routing and Postman for manual API testing.
0
stars
0
forks
source link
headCount aggregate function for the Student controller #6
The Student controller should have a headCount aggregate function to get the total number of students by making use of MongoDB aggregate operators.
The brief asks for two aggregate functions so I should work on them together.
I think that these two 'tasks' on the list aren't really tasks - just notes to help build these aggregate functions:
The project will require research of MongoDB operators such as $addToSet, $unwind, $group, $match, and $avg.
Student lookup will require use of the ObjectId() method.
It is worth spelling out somewhere what each of them does in layman's terms - and probably want to use them all, or explain why I didn't use them all (even if it means solving the problem twice).
To meet this criteria from the brief:
The Student controller should have a headCount aggregate function to get the total number of students by making use of MongoDB aggregate operators.
The brief asks for two aggregate functions so I should work on them together.
I think that these two 'tasks' on the list aren't really tasks - just notes to help build these aggregate functions:
The project will require research of MongoDB operators such as $addToSet, $unwind, $group, $match, and $avg.
Student lookup will require use of the ObjectId() method.
It is worth spelling out somewhere what each of them does in layman's terms - and probably want to use them all, or explain why I didn't use them all (even if it means solving the problem twice).