wiki:UseCase008

Version 3 (modified by 232012, 6 days ago) ( diff )

--

UseCase008 - New Product creation

Initiating actor: Logged-In Admin

The goal of this use case is to allow an administrator to introduce a new physical format for an existing musical release into the store's inventory. By creating a new product record, the admin can specify unique attributes such as the media format, price, and initial stock levels, making the item available for consumers to purchase.

Scenario

  1. Admin selects an existing Release (Album or Single) for which they want to add a new physical version.
SELECT release_id, title 
FROM RELEASES;
  1. Admin enters the specific details for the new inventory item, including the format (e.g., Vinyl, CD, Cassette), the unit price, a brief description, and the initial stock quantity.
  1. System validates that the provided information meets the required data formats and that the product_id is unique.
SELECT COUNT(*) 
FROM PRODUCTS 
WHERE product_id = :new_product_id;
  1. System creates a new entry in the Product table, establishing a "version of" relationship with the selected release_id.
INSERT INTO PRODUCTS (product_id, release_id, format, price, product_description, stock) 
VALUES (:new_product_id, :selected_release_id, 'VINYL', 30.59, '180g Black Vinyl', 50);
  1. System updates the catalog to include this new Product, making it visible and available for purchase on the corresponding release page.
SELECT * FROM PRODUCTS 
WHERE release_id = :selected_release_id;
Note: See TracWiki for help on using the wiki.