wiki:UseCase13

Use-case 0013 - Remove a Pet

Initiating actor: Pet Owner

Other actors: None

Description: A Pet Owner wants to remove a pet profile from their account. The system securely deletes the pet, verifying that the user requesting the deletion is the actual owner.

Scenario:

  1. Pet Owner goes to their "My Pets" dashboard.
  2. System fetches the pets currently owned by this user:
    SELECT pet_id, name, age 
    FROM pets 
    WHERE owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan');
    
  3. Owner clicks the "Delete" button next to their pet.
  4. System executes the deletion, ensuring the owner ID corresponds:
    DELETE FROM pets 
    WHERE name = 'Sharka' 
      AND owner_id = (SELECT user_id FROM users WHERE username = 'owner_bojan');
    
Last modified 2 hours ago Last modified on 05/08/26 03:20:58
Note: See TracWiki for help on using the wiki.