The Guest List

Problem 12

The Guest List

preview

Design the SQLite schema for an events and RSVP system with enforced relational constraints and an attendance view.

Requirements

  1. 01Create events(name, capacity), users(email), and rsvps linking one user to one event; each table has an integer primary key named id.
  2. 02Require non-empty event names, positive capacities, and case-insensitively unique user emails.
  3. 03Prevent duplicate RSVPs for the same user and event with a database constraint.
  4. 04Deleting an event or user cascades to its RSVPs with foreign-key enforcement enabled.
  5. 05Create event_attendance with one row for every event, including zero-attendance events, and an attendee_count column.

Constraints

  • • Submit one compact engineering spec, not implementation code.
  • • The generated artifact must use the declared SQLite 3 adapter.
  • • Scoring rewards observable behavior and prompt efficiency, not runtime.
Difficulty
intermediate
Target
11 min
Acceptance
Artifact
database