Question: Imagine that you need to design a database for an on-line wine shop. The shop sells bottles of wine. Each bottle has a price
Imagine that you need to design a database for an on-line wine shop. The shop sells bottles of wine. Each bottle has a price and a volume (for example, 0.75 1 or 0.375 1). Each wine has a name, type (red, white or rose), year of production, grape variety, and a wine-maker. Each wine-maker comes from a particular region and country (for example, Bordeaux, France). The same wine-maker can make several different kinds of wine, and there can be several wine-makers in the same region. The same wine name can be used by several wine-makers, but the (wine name, wine-maker) combination is unique. You can also assume that wine-maker's name is unique. (a) Draw an entity-relationship diagram for the wine-shop database. (10) (b) Describe the schemas for the wine-shop database (names of tables, column names, types of 1 values for each attribute). (5) (c) What are the candidate keys in the tables for the wine shop? (5) (d) What are the foreign keys in the tables for the wine shop? (5)
Step by Step Solution
3.50 Rating (153 Votes )
There are 3 Steps involved in it
a EntityRelationship Diagram Entities Wine WineMaker Region Bottle Relationships Produces WineMa... View full answer
Get step-by-step solutions from verified subject matter experts
