If MongoDB does not have an intermediate table, how will it be designed, how will the students correspond to the courses and how will they rank the scores of the courses?

  mongodb, question

Multiple students can choose multiple courses, and no course has a score.
How to find out the ranking of each course?

Currently, students have a course attribute, array type. Store course id.

Under the condition of not causing significant problems, redundancy is encouraged to replace the design of normal form. For example, in your case, other necessary attributes other than the course ID can be added to the course attributes, including the course score.
The problem of ranking may not be easy to use the index, but how many people take a course? If the amount of data is small, direct memory sorting is good.

db.students.aggregate([
 //If there are other filtering conditions, such as class
 {$unwind: "$course"},
 {$match: {"course.name ":"math "}}},
 {$sort: {"course.name": 1}}
 
 ])