SQLintermediatebackendAI generated

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

  1. 01

    Design the schema

    ~2h

    Create students, courses, a course_prerequisites table, and enrollments with capacity limits.

  2. 02

    Insert sample data

    ~1.5h

    Add courses with chained prerequisites and a set of student enrollments.

  3. 03

    Resolve full prerequisite chains

    ~2.5h

    Write a recursive CTE that expands a course's entire prerequisite chain.

  4. 04

    Check student eligibility

    ~2h

    Write a query that determines whether a given student has completed all prerequisites for a course.

  5. 05

    Report over-capacity sections

    ~1.5h

    Write a query flagging course sections where enrollment exceeds capacity.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~9.5h · 5 steps

Tech stack

PostgreSQLpgAdmin