Appendix C. Logical Model for the Wine Club

only for RuBoard - do not distribute or recompile

Appendix C. Logical Model for the Wine Club

In this appendix we display the relational logical schema. The purpose of this is to show how the components fit together and especially to show the use of existence attributes. The domains have been omitted.

Relation Customer
Customer_Code
Customer_Name
Hobby_Code
Date_Joined
Primary Key (Customer_Code)
Foreign Key (Hobby_Code references Hobby.Hobby_Code)
 
Relation Customer Exist
Customer_Code
Customer_Exist_Start
Customer_Exist_End
Primary Key (Customer_Code, Customer_Exist_Start)
Foreign Key (Customer_Code references Customer.Customer_Code)
 
Relation Customer Address Exist
Customer_Code
Customer_Address_Exist_Start
Customer_Address_Exist_End
Customer_Address
Primary Key (Customer_Code, Customer_Address_Exist_Start)
Foreign Key (Customer_Code references Customer.Customer_Code)
 
Relation Customer Sales Area
Customer_Code
Sales_Area_Code
Sales_Area_Code_Exist_Start
Sales_Area_Code_Exist_End
Primary Key (Customer_Code,Sales_Area_Code,Sales_Area_Code_Exist_Start)
Foreign Key (Sales_Area_Code references Sales_Area.Sales_Area_Code)
Foreign Key (Customer_Code references Customer.Customer_Code)
 
Relation Sales_Area
Sales_Area_Code
Sales_Area_Name
Primary Key (Sales_Area_Code)
 
Relation Manager Sales Area
Manager_Code
Sales_Area_Code
Manager_Sales_Area_Code_Exist_Start
Manager_Sales_Area_Code_Exist_End
PrimaryKey (Manager_Code,Sales_Area_Code, Manager_Sales_Area_Code_Exist_Start)
Foreign Key (Sales_Area_Code references Sales_Area.Sales_Area_Code)
Foreign Key (Manager_Code references Manager.Manager_Code)
 
Relation Manager
Manager_Code
Manager_Name
Primary Key (Manager_code)
 
Relation Manager Exist
Manager_Code
Manager_Exist_Start
Manager_Exist_End
Primary Key (Manager_Code, Manager_Exist_Start)
Foreign Key (Manager_Code references Manager.Manager_Code)
 
Relation Color
Color_Code
Color
Primary Key (Color_Code)
 
Relation Hobby
Hobby_Code
Hobby_Name
Primary Key (Hobby_Code)
 
Relation Region
Region_Code
Region_Name
Country
Primary Key (Region_Code)
 
Relation Wine Sales
Customer_Code
Wine_Code
Time_Code
Quantity
Value
Foreign Key (Customer_Code references Customer.Customer_Code)
Foreign Key (Wine_Code references Wine.Wine_Code)
Foreign Key (Time_Code references Dot_Time.Time_Code)
 
Relation Supplier
Supplier_Code
Supplier_Exist
Supplier_Name
Supplier_Address
Phone
Primary Key (Supplier_Code)
 
Relation Wine
Wine_Code
Wine_Name
Color_Code
ABV
Region_Code
Primary Key (Wine_Code)
Foreign Key (Color_Code references Color. Color_Code)
Foreign Key (Region_Code references Region. Region_Code)
 
Relation Wine_Exist
Wine_Code
Wine_Exist_Start
Wine_Exist_End
Primary Key (Wine_Code, Wine_Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
 
Relation Bottle_Price_Exist
Wine_Code
Bottle_Price_Exist_Start
Bottle_Price_Exist_End
Bottle_Price
Primary Key (Wine_Code, Bottle_Price_Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
 
Relation Case_Price_Exist
Wine_Code
Case_Price_Exist_Start
Case_Price_Exist_End
Case_Price
Primary Key (Wine_Code, Case_Price_Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
 
Relation Bottle_Cost_Exist
Wine_Code
Bottle_Cost_Exist_Start
Bottle_Cost_Exist_End
Bottle_Cost
Primary Key (Wine_Code, Bottle_Cost_Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
 
Relation Vintage_Exist
Wine_Code
Vintage_Exist_Start
Vintage_Exist_End
Vintage
Primary Key (Wine_Code, Vintage_Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
 
Relation Wine_Supplier
Wine_Code
Supplier_Code
Wine_Supplier_Exist_Start
Wine_Supplier _Exist_End
Primary Key (Wine_Code, Supplier_Code, Wine_Supplier Exist_Start)
Foreign Key (Wine_Code references Wine.Wine_Code)
Foreign Key (Supplier _Code references Supplier. Supplier_Code)
only for RuBoard - do not distribute or recompile


Designing a Data Warehouse . Supporting Customer Relationship Management
Designing A Data Warehouse: Supporting Customer Relationship Management
ISBN: 0130897124
EAN: 2147483647
Year: 2000
Pages: 96
Authors: Chris Todman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net