この図は、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行以上の行に関連付けます。