Description
For this assignment, you will create the University database that is like Assignment 2.
Students
StudentNo : number
StudentFirstName: string
StudentLastName: string
Degree: string
Faculty: string
GPA: number
Enrolled: array => object { CourseNo : string, ProfFirstName: string, ProfLastName: string, Term : string }
Professors
ProfFirstName: string
ProfLastName: string
ProfPhone: string
Faculty: string
CanTeach: array => object { CourseNo: string, Term: string, Preference: string }
Teaches: array => object { CourseNo: string, Term: string }
Courses
CourseNo: number
CourseName: string
CourseDescription: string
Faculty: string
You will create 3 collections in your database and insert them with several documents that will be able
to answer the following questions:
1. Create 3 collections named Students, Professors, and Courses.
2. Insert about 10 Students to the Students collection. Each document will have the
following fields: StudentNo, StudentFirstName, StudentLastName, Degree, Faculty, GPA,
Enrolled
3. Insert about 5 Professors to the Professors collection. Each document will have the
following fields: ProfFirstName, ProfLastName, ProfPhone, Faculty, CanTeach, Teaches
4. Insert about 5 courses to the Courses collection. For the course description, you may
copy from the Ryerson course calendar. Each document will have the following fields:
CourseNo, CourseName, CourseDescription, Faculty
5. List all the documents for the collections Students, Professors, and Courses.
6. Write a query to find one of your records by name without using limit(). You can use the
findOne() function and pay attention to the format from the output.
7. Write a query that retrieves the top 5 newest student.
8. Update your records ( Name or StudentNo or Faculty ).
9. Write a query to change all the students from the Engineering faculty to Arts faculty.
10. Write a query to find in the course description that contains the word “advanced”
You will need to submit screenshots of your collections, the queries used to answer the questions, and
the output of the queries.