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) |