この図は、SHスキーマの表について説明しています。
costs表の属性は、次のとおりです。
列: prod_id、time_id、promo_id、channel_id、unit_cost、unit_price
関係:
列prod_idは、costs表の1行以上の行を、products表の行のうちのprod_idに対応する値を持つ1行に関連付けます。
列time_idは、costs表の1行以上の行を、times表の行のうちのtime_idに対応する値を持つ1行に関連付けます。
products表の属性は、次のとおりです。
列: prod_id(主キー)、prod_name、prod_desc、prod_subcategory、prod_subcategory_id、prod_subcategory_desc、prod_category、prod_category_id、prod_category_desc、prod_weight_class、prod_unit_of_measure、prod_pack_size、supplier_id、prod_status、prod_list_price、prod_min_price、prod_total、prod_total_id、prod_src_id、prod_eff_from、prod_eff_to、prod_valid
関係:
列prod_idは、products表の行を、sales表のうちのprod_idに対応する値を持つ1行以上の行に関連付けます。
列prod_idは、products表の行を、costs表のうちのprod_idに対応する値を持つ1行以上の行に関連付けます。
promotions表の属性は、次のとおりです。
列: promo_id(主キー)、promo_name、promo_subcategory、promo_subcategory_id、promo_category、promo_category_id、promo_cost、promo_begin_date、promo_end_date、promo_total、promo_total_id
関係:
列promo_idは、promotions表の行を、sales表のうちのpromo_idに対応する値を持つ1行以上の行に関連付けます。
sales表の属性は、次のとおりです。
列: prod_id、cust_id、time_id、channel_id、promo_id、quantity_sold、amount_sold
関係:
列prod_idは、sales表の1行以上の行を、products表の行のうちのprod_idに対応する値を持つ1行に関連付けます。
列promo_idは、sales表の1行以上の行を、promotions表の行のうちのpromo_idに対応する値を持つ1行に関連付けます。
列channel_idは、sales表の1行以上の行を、channels表の行のうちのchannel_idに対応する値を持つ1行に関連付けます。
列cust_idは、sales表の1行以上の行を、customers表の行のうちのcust_idに対応する値を持つ1行に関連付けます。
列time_idは、sales表の1行以上の行を、times表の行のうちのtime_idに対応する値を持つ1行に関連付けます。
channels表の属性は、次のとおりです。
列: channel_id(主キー)、channel_desc、channel_class、channel_class_id、channel_total、channel_total_id
関係:
列channel_idは、channels表の行を、sales表のうちのchannel_idに対応する値を持つ1行以上の行に関連付けます。
customers表の属性は、次のとおりです。
列: cust_id(主キー)、cust_first_name、cust_last_name、cust_gender、cust_year_of_birth、cust_marital_status、cust_street_address、cust_postal_code、cust_city、cust_city_id、cust_state_province、cust_state_provice_id、country_id、cust_main_phone_number、cust_income_level、cust_credit_limit、cust_email、cust_total、cust_total_id、cust_src_id、cust_eff_from、cust_eff_to、cust_valid
関係:
列cust_idは、customers表の行を、sales表のうちのcustomer_idに対応する値を持つ1行以上の行に関連付けます。
列country_idは、customers表の1行以上の行を、countries表の行のうちのcountry_idに対応する値を持つ1行に関連付けます。
times表の属性は、次のとおりです。
列: time_id(主キー)、day_name、day_number_in_week、day_number_in_month、calendar_week_number、fiscal_week_number、week_ending_day、week_ending_day_id、calendar_month_number、fiscal_month_number、calendar_month_desc、calendar_month_id、fiscal_month_desc、fiscal_month_id、days_in_cal_month、days_in_fis_month、end_of_cal_month、end_of_fis_month、calendar_month_name、fiscal_month_name、calendar_quarter_desc、calendar_quarter_id、fiscal_quarter_desc、fiscal_quarter_id、days_in_cal_quarter、days_in_fis_quarter、end_of_cal_quarter、end_of_fis_quarter、calendar_quarter_number、fiscal_quarter_number、calendar_year、calendar_year_id、fiscal_year、fiscal_year_id、days_in_cal_year、days_in_fis_year、end_of_cal_year、end_of_fis_year
関係:
列time_idは、times表の行を、sales表のうちのtime_idに対応する値を持つ1行以上の行に関連付けます。
countries表の属性は、次のとおりです。
列: country_id(主キー)、country_iso_code、country_name、country_subregion、country_subregion_id、country_region、country_region_id、country_total、country_total_id、country_name_hist
関係:
列customer_idは、countries表の行を、customers表のうちのcustomer_idに対応する値を持つ1行以上の行に関連付けます。