| Version 2 (modified by , 2 weeks 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
- Admin selects an existing Release (Album or Single) for which they want to add a new physical version.
SELECT release_id, title FROM Release;
- 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.
- System validates that the provided information meets the required data formats and that the product_id is unique.
SELECT COUNT(*) FROM Product WHERE product_id = @new_product_id;
- System creates a new entry in the Product table, establishing a "version of" relationship with the selected release_id.
INSERT INTO Product (release_id, format, price, description, stock) VALUES (@selected_release_id, 'Vinyl', 3059, '180g Black Vinyl', 50);
- System updates the catalog to include this new Product, making it visible and available for purchase on the corresponding release page.
SELECT * FROM Product WHERE release_id = @selected_release_id;
Note:
See TracWiki
for help on using the wiki.
