Design an Institute Attendance Management Platform
Record class-session attendance, support audited corrections, and serve student and institute reports.
Problem statement
Design the database and system architecture for an institute attendance management platform. For this exercise, assume institutes manage terms, courses, sections, rosters, scheduled class sessions, instructors, and students.
An authorized instructor marks one attendance outcome per enrolled student and session; late corrections require a reason and immutable audit history. Students view their own records, staff view course and term summaries, and roster changes must not rewrite past session truth.
Cover data modeling, APIs, authorization, concurrent edits, reporting, imports, auditability, and recovery. Biometric capture and payroll are outside scope.
What to build
- Create terms, courses, sections, rosters, and scheduled class sessions with stable identities.
- Idempotently record one authorized attendance outcome per student and session.
- Apply authorized corrections without erasing the prior value, actor, time, or reason.
- Serve student, section, and term summaries with declared freshness and access control.
At scale
- For this exercise, assume 5,000 institutes, ten million active students, and one million class sessions on a busy day.
- For this exercise, attendance marking peaks near session start and end; 99 percent of accepted writes should be visible in the session roster within two seconds.
- For this exercise, retain attendance and correction audit history for seven years and support term-level exports without blocking transactional writes.
- For this exercise, roster changes after a session begins must not rewrite that session's historical eligibility; effective dates, event history, a pinned set, or another auditable model may preserve that outcome.