wiki:BrowseProducts

Version 1 (modified by 235018, 13 hours ago) ( diff )

--

Browse Products and Categories

Actors: Guest User / Registered User

1. The user opens the product catalog.

2. The system retrieves product data from the database.

SELECT product.code, product.price, product.description, category.name AS category, store.name AS store FROM product
JOIN category ON product.category_id = category.id
JOIN store ON product.store_id = store.store_ID;

3. If the user is interested in a product, the system can provide more data about it.

SELECT product.code, product.price, product.description, category.name AS category, store.name AS store, image.image AS product_image, color.color AS product_color FROM product
JOIN category ON product.category_id = category.id
JOIN store ON product.store_id = store.store_ID
JOIN image ON product.code = image.product_code
JOIN color ON product.code = color.product_code
WHERE product.code='00100001';

Note: See TracWiki for help on using the wiki.