This project demonstrates how to design and query a MongoDB database for a learning management system called Zen Class.
Below are the collections used in the database:
- users β Stores users data.
- codekata β Tracks problems solved by users on CodeKata platform.
- attendance β Records daily attendance status of users.
- topics β Contains topics taught in class with dates.
- tasks β Contains tasks assigned, linked to topics and submission info.
- company_drives β Stores company placement drive details.
- mentors β Stores mentor data and count of their mentees.
1. Users:
{
  _id: ObjectId("user1"),
  name: "john",
  email: "john@gmail.com",
  mentor_id: ObjectId("mentor1")
}
2. Codekata:
{
  user_id: ObjectId("user1"),
  problems_solved: 15
}
3. Attendance:
{
  user_id: ObjectId("user1"),
  date: new Date("2020-10-20"),
  attendance_status: "Present"
}
4. Topics:
{
  _id: ObjectId("topic1"),
  topic_name: "JavaScript",
  date: new Date("2020-10-15")
}
5. Tasks:
{
  _id: ObjectId("task1"),
  topic_id: ObjectId("topic1"),
  task_name: "Zen Class Programme",
  date: new Date("2020-10-15"),
  submitted_by: [ObjectId("user1"), ObjectId("user2")]
}
6. Company drives:
{
  _id: ObjectId("drive1"),
  company_name: "Google",
  date: new Date("2020-10-20"),
  attended_students: [ObjectId("user1"), ObjectId("user2")]
}
7. Mentors:
{
  _id: ObjectId("mentor1"),
  name: "John",
  mentee_count: 30
}
- 
MongoDB installed or MongoDB Atlas account. 
- 
MongoDB Compass or shell access. 
- 
Sample data loaded based on the schema above. 
- 
All date filters use new Date("YYYY-MM-DD") format. 
- 
Joins are achieved using $lookup. 
- 
Grouping and filtering uses $project, $match, $group, $size, and $in (Aggregation Pipeline). 
- 
Some keywords and array methods such as let, toArray() & map() are used in solving the queries without using aggregations. 
- Developed by: Vignesh R
- GitHub: @VigneshRav
- Email: vignesh212000@gmail.com