Overview
Recently, I practiced MongoDB queries using a sample Job Portal database.
Instead of learning operators in isolation, I used a realistic Job Portal dataset to better understand how MongoDB queries work in real-world applications.
Dataset Structure
A sample jobs collection was created with fields such as:
title
company
location
salary
experience
skills
applicants
status
department
Example Document
{ title : " \" Software Engineer \" , " company : " TechCorp Bangladesh " , salary : 75000 , skills : [ " JavaScript " , " Node.js " , " MongoDB " ] }
Enter fullscreen mode
Exit fullscreen mode
Topics Covered
1. Comparison Operators
Used for filtering documents based on value comparison.
Operators covered:
$eq
$ne
$gt
$gte
$lt
$lte
Example:
db . jobs . find ({ salary : { $gt : 70000 } })
Enter fullscreen mode
Exit fullscreen mode
2. Logical Operators
Combining multiple query conditions.
Operators covered:
$and
$or
$not
$nor
Example:
db . jobs .…