wiki:UseCase001

UseCase001 - Registering a user

Initiating actor: Unregistered Guest

The goal of this use case is to allow a new visitor to create a permanent account within the system by providing their personal details. Upon successful registration, the system creates a new record in the User table and assigns the user to the Consumer role, enabling them to access personalized features like wishlists and order history.

Scenario

  1. User provides their required registration details, including a email, password and username, and submits the registration form.
  1. System validates that the email is unique and that all required fields meet the necessary formatting standards.
SELECT COUNT(*) 
FROM USERS 
WHERE email = 'user@example.com';
  1. System creates a new entry in the User table with a unique user_id and the current date_created.
INSERT INTO USERS (user_id, email, password, username, date_created) 
VALUES (7, 'user@example.com', 'hashed_password', 'NewUser', CURRENT_DATE);
  1. System initializes a corresponding entry in the Consumer table, setting the points_collected to zero and establishing the one-to-one relationship with the new user_id.
INSERT INTO CONSUMERS (user_id, points_collected) 
VALUES (7, 0);
  1. System confirms the successful account creation and automatically logs the user in.
Last modified 6 days ago Last modified on 05/21/26 18:08:37
Note: See TracWiki for help on using the wiki.