What's the best approach to implementing attendance tracking in MongoDB for MEAN stack?

38 views Asked by At

i want to design efficient mongodeb structure for attendance management in mongoDB. i want to do folloing operations in my web application

  • employee will have 4 types of attendance full(8 hrs shift),half(4 hrs shift),night(12 hrs shift),absent
  • retrive monthly attendance info of specific employee.
  • retrive info of given date.
  • retrive attendance info of specific employee on specific date.

i made these collections for the operation

employee collection

{
  _id: ObjectId("..."),
  employeeID: "S123",
  name: "John Doe",
  type: "karigar",
  // Additional fields
}

Attendance Collection:

{
  _id: ObjectId("..."),
  employeeID: "S123",
  date: ISODate("2023-06-05"),
  AttendanceType: "full"
}

but its the sql way of storing data using relations is there any batter sollutions ?

0

There are 0 answers