= UseCase008 - New Product creation **Initiating actor:** Logged-In Admin {{{#!div style="text-align: justify; width: 100%;" 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 {{{#!div style="text-align: justify; width: 100%;" 1. Admin selects an existing Release (Album or Single) for which they want to add a new physical version. {{{#!div style="margin-left: 20px;" {{{ SELECT release_id, title FROM RELEASES; }}} }}} 2. 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. 3. System validates that the provided information meets the required data formats and that the product_id is unique. {{{#!div style="margin-left: 20px;" {{{ SELECT COUNT(*) FROM PRODUCTS WHERE product_id = :new_product_id; }}} }}} 4. System creates a new entry in the Product table, establishing a "version of" relationship with the selected release_id. {{{#!div style="margin-left: 20px;" {{{ 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); }}} }}} 5. System updates the catalog to include this new Product, making it visible and available for purchase on the corresponding release page. {{{#!div style="margin-left: 20px;" {{{ SELECT * FROM PRODUCTS WHERE release_id = :selected_release_id; }}} }}} }}}