Changes between Version 1 and Version 2 of UseCase09


Ignore:
Timestamp:
05/17/26 20:00:37 (8 days ago)
Author:
181201
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase09

    v1 v2  
    66
    77'''Description:'''
    8 The Admin moderates the platform by reviewing the user behavior. If a user is problematic, the admin can completely remove them from the platform. Because the database uses CASCADE delete rules, deleting the user automatically cleans up their pets, bookings, and reviews.
     8The Admin moderates the platform by reviewing user behavior. If a user is problematic, the admin can completely remove them. To satisfy database constraints, the system first clears their active bookings, then deletes the user (which cascades to delete their pets and reviews).
    99
    1010'''Scenario:'''
     
    1717ORDER BY username ASC;
    1818}}}
    19  3. Admin clicks the "Delete User" button next to a specific user they want to remove.
    20  4. System executes the deletion, cascading to all related tables:
     19 3. Admin clicks the "Delete" button next to a specific user.
     20 4. System executes the deletion cleanly:
    2121{{{
    2222#!sql
    23 DELETE FROM users
    24 WHERE username = 'owner_marko';
     23DELETE FROM bookings WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_marko');
     24DELETE FROM users WHERE username = 'owner_marko';
    2525}}}