Presentation is loading. Please wait.

Presentation is loading. Please wait.

The winstore is summarized as follows A customer at the online winestore purchases wines by placing one or more orders Each customer has exactly one set.

Similar presentations


Presentation on theme: "The winstore is summarized as follows A customer at the online winestore purchases wines by placing one or more orders Each customer has exactly one set."— Presentation transcript:

1 The winstore is summarized as follows A customer at the online winestore purchases wines by placing one or more orders Each customer has exactly one set of user details Each customer has a title (such as “Mr” or “Dr”) and lives in a country. Each order contains one or more items Each item has a specific quantity of wine at a specific price A wine is of a type such as “Red,” “White,” or “Sparkling A wine has a vintage year; if the same wine has two or more vintages from different years, these are treated as two more distinct wines. Each wine is made by one winery

2 The winstore is summarized as follows Each winery is located in one region Each wine has one or more grape_variety entries. For example, a sine of wine_name “Archibald” might be made of the grape-variety entries “Sauvignon” and “Cabernet.” The order of entries is important. For example, a “Cabernet Sauvignon” is different from a “Sauvignon Cabernet” Each inventory for a wine represents the on-hand stock of a wine. If a wine is available at two prices, there are two inventories. Similarly, if the stock arrived at the warehouse at two different times, there are two inventories. Each wine may have one or more inventories.

3 users(cust_id, user_name, password) customer(cust_id, surname, firstname, initial, title_id, address, city, state, zipcode, country_id, phone, birth_date) grape_variety(variety_id, variety) inventory(wine_id, inventory_id, on_hand, cost, date_added) items(cust_id, order_id, item_id, wine_id, qty, price) orders(cust_id, order_id, date, instructions, creditcard, expirydate region(region_id, region_name) wine_type(wine_type_id, wine_type) wine(wine_id, wine_name, wine_type, year, winery_id, description) wine_variety(wine_id, variety_id, id,) winery(winery_id, winery_name, region_id) countries(country_id, country)

4 users -user_name (id) -password customer -cust_id (id) -surname -firstname -initial -title_id -address -city -state -zipcode -country-id -phone -birthdate orders -cust_id (id) -order_id (id) -date -instructions -creditcard -expirydate items -cust_id (id) -order_id (id) -item_id (id) -wine_id -qty -price wine_type -wine_type_id (id) -wine_type grape_variety -variety_id (id) -variety wine -wine_id (id) -wine_name -wine_type -year -winery_id -description region -region_id (id) -region_name winery -winery_id (id) -winery_name -region_id countries -country_id (id) -country inventory -wine_id (id) -inventory_id (id) -on_hand -cost -date_added 1M wine_variety -wine_id (id) -variety_id (id) -id M N M1 M1 M 1 M 1 M 1


Download ppt "The winstore is summarized as follows A customer at the online winestore purchases wines by placing one or more orders Each customer has exactly one set."

Similar presentations


Ads by Google