Chapter 3: Core Aggregations - Lecture $graphLookup: Simple Lookup, Quiz question

The quiz on Chapter 3: Core Aggregations - Lecture $graphLookup: Simple Lookup does not have any explanations for the answers, it only shows the correct answers.

In addition to the correct answers I also selected the first choice -

'as determines a collection where $graphLookup will store the stage results'

… but this was deemed incorrect. Why? Is it because of the use of the word ‘collection’ instead of ‘array’?

2 Likes

Yes. An array is quite different from a collection.

An array is a field in a document that holds a list of simple values or is a list of sub-documents.

A collection is a list of document stored on disk within a database.

And the as documentation is ''Name of the array field added to each output document. Contains the documents traversed in the $graphLookup stage to reach the document."

Well, I understand that a collection and an array are two different things. I think this is a trick question. When I am trying to discover and learn about new abstract concepts I believe it is the basis of the newly learned concept which is of primary importance. The ‘spirit’ of answer number 1 - 'as determines a collection where $graphLookup will store the stage results' is met. Call it a group, collection, table, bucket, whatever, the ‘as’ does in fact determine the name of the entity where $graphLookup will store the stage results. By testing a newbies knowledge of vocabulary here is confusing. The quiz should be focused solely on the merit of the abstract concepts in the lectures, not vocabulary. Given there is no explanation for the answers someone might not understand why this is not a correct answer. They may leave thinking that the ‘as’ does not provide the results of the $graphLookup - the more important concept here.

If the purpose of this question is to determine if a pupil understands the difference between a collection and an array then it seems more appropriate to ask that question rather than hide it inside another concept the pupil is struggling to understand. Abstract concepts are already difficult to understand without tricks. I have seen mistakes in the training material so I assumed the author of the question simply misspoke. We are human.

5 Likes

Still agree with the point @Barron_43628 made over 2 years later.