University Course Enrollment with Prerequisites
Model students, courses, prerequisites, and enrollments, then write queries that validate whether a student meets prerequisites before enrolling and report course capacity conflicts. Learners practice self-referencing tables, recursive CTEs for prerequisite chains, and constraint-based validation queries.
- Estimate
- ~9.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
PostgreSQL · pgAdmin
Project roadmap
- 01
Design the schema
~2hCreate students, courses, a course_prerequisites table, and enrollments with capacity limits.
- 02
Insert sample data
~1.5hAdd courses with chained prerequisites and a set of student enrollments.
- 03
Resolve full prerequisite chains
~2.5hWrite a recursive CTE that expands a course's entire prerequisite chain.
- 04
Check student eligibility
~2hWrite a query that determines whether a given student has completed all prerequisites for a course.
- 05
Report over-capacity sections
~1.5hWrite a query flagging course sections where enrollment exceeds capacity.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack