Changes between Version 1 and Version 2 of UseCase09
- Timestamp:
- 05/17/26 20:00:37 (8 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase09
v1 v2 6 6 7 7 '''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.8 The 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). 9 9 10 10 '''Scenario:''' … … 17 17 ORDER BY username ASC; 18 18 }}} 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: 21 21 {{{ 22 22 #!sql 23 DELETE FROM users24 WHERE username = 'owner_marko';23 DELETE FROM bookings WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_marko'); 24 DELETE FROM users WHERE username = 'owner_marko'; 25 25 }}}
