この図は、スキーマHRのリレーショナル表と各表の列、および表の間の依存性を示します。
employees表には次の属性があります。
列: employee_id(主キー)、first_name、last_name、電子メール、phone_number、hire_date、job_id、salary、commission_pct、manager_id、department_id。
関係:
列department_idは、1表の各行を、department_idのうちの1つの値に関連付ける
列job_idは、1表の各行を、job_idのうちの1つの値に関連付ける
列employee_idは、job_history表の各行を、employee_idのうちの0行以上の行と関連付けます。
列manager_idは、対応するemployee_idを介して、employees表の他の1行を参照しません。通常、会社の最高の責任者にマネージャはいません。
その他の関係:
Column employee_id relates rows of the table employees to sales_rep_id columns in the table oe.orders
Column employee_id relates rows of the table employees to account_mgr_id columns in the table oe.customers
ジョブ表には次の属性があります。
列: job_id(主キー)、job_title、min_salary、max_salary
関係:
列job_idは、表ジョブの各行を、jobs_id表の列employeesのうちの対応する値に関連付けます
列job_idは、jobs_id表の列job_historyのうちの対応する値に、表ジョブの行を関連付けません。
job_history表には、次の属性があります。
列: employee_idおよびstart_date(複合主キー)、end_date、job_id、department_id。
関係:
各job_historyレコードは、employee_idを介して、表employeesのレコードに関連付けられます。
部門表には次の属性があります。
列: department_id(主キー)、department_name、manager_id、location_id。
関係:
Column department_id relates each row of the table departments to none or more rows of the table employees that have corresponding values for department_id.
Column manager_id relates each row of the table departments to a row of the table employees that has the corresponding value for employee_id.
Column location_id relates each row of the table departments to a row of the table locations that has the corresponding value for location_id.
ロケーション表には、次の属性があります。
列: location_id(主キー)、street_address、postal_code、city、state_provinceおよびcountry_id。
関係:
列location_idは、表の各行を、location_idに対応する値を持つ表部門の1行以上の行に関連付けします。
列country_idは、country_idに対応する値を持つ表の国の各行を、表の各行に関連付けます。
その他の関係:
列location_idは、loacation_idの対応する値を持つ表eo.warehousesのどの行にも、表の位置の行を関連付けます。
国表には、次の属性があります。
列: country_id(主キー)、country_name、region_id。
関係:
列region_idは、表の各行を、region_idに対応する値を持つ表リージョン内の行に関連付けます。
列country_idは、表の各行を、country_idに対応する値を持つ表の位置のどの行にも関連付けます。
リージョン表には、次の属性があります。
列: region_id(主キー)、region_name。
関係:
列region_idは、表リージョンの行を、region_idに対応する値を持つ表の国の1行以上の行と関連付けます。
また、この図は、スキーマOEについて説明し、2つのスキーマ間の依存性を表します。
order_items表には、次の属性があります。
列: order_id(主キー)、line_item_id、product_id、unit_price、および数量。
関係:
列order_idは、order_items表の1行以上の行を、order_idの対応する値を持つ1行以上の行に関連付けます
列product_idは、order_items表の1行以上の行を、product_information表の行の範囲のproduct_idに対応する値を持つ1行に関連付けられます。
Orders表には次の属性があります。
列: order_id(主キー)、order_date、order_mode、customer_id、order_status、order_total、sales_rep_id、promotion_id
関係:
列order_idは、order_idの対応する値を持つ表order_itemsの1行以上の行に、表順序の1行を関連付けます。
列customer_idは、customer_id表の1行以上の行を、2表の行のうちの1行に対応する値を持つ1行に関連付けます
その他の関係:
Column sales_rep_id relates one or more rows of the table orders to one row of the table hr.employees with the corresponding value of employee_id.
product_information表には、次の属性があります。
列: product_id(主キー)、product_name、product_description、category_id、weight_class、warranty_period、supplier_id、product_status、list_price、product_id、min_priceおよびcatalog_url
関係:
Column product_id relates one row of the table product_information to one or more rows of the table order_items with the corresponding value of product_id.
列product_idは、product_information表の1行を、product_descriptions表の列のうちのproduct_idに対応する値を持つ0行以上の行に関連付けします。
列product_idは、product_information表の1行を、product_idに対応する値を持つ表インベントリの0行以上の行に関連付けます
product_descriptions表には、次の属性があります。
列: product_idおよびlanguage_id(複合主キー)、translated_name、translated_description
関係:
列product_idは、product_descriptions表の1行以上の行を、product_information表の行のうちのproduct_idに対応する値を持つ1行の関連付けます。
在庫表には、次の属性があります。
列: product_idおよびwarehouse_id(複合主キー)、quantity_on_hand。
関係:
Column product_id relates one or more rows of the table inventories to one row of the table product_information with the corresponding value of product_id.
列warehouse_idは、表インベントリの1行以上を、warehouse_idの対応する値を持つ表ウェアハウスの1行に関連付けます
customers表には次の属性があります。
列: customer_id(主キー)、cust_first_name、cust_last_name、cust_address、phone_numbers、nls_language、nls_territory、credit_limit、cust_email、account_mgr_id、cust_geo_location、date_of_birth、marital_status、性別、income_level
関係:
列customer_idは、customer_idの対応する値を持つ表順序の1行以上に表customersの行を関連付けます。
その他の関係:
列acct_mgr_idは、employee_id表の1行以上の行を、hr.employees表の行のうちの1行に対応する値を持つ1行に関連付けます
倉庫表には次の属性があります。
列: warehouse_id(主キー)、warehouse_spec、warehouse_name、location_id、wh_geo_location
関係:
列warehouse_idは、表ウェアハウスの行を、warehouse_idの対応する値を持つ表インベントリの1行以上に関連付けます
その他の関係:
列location_idは、表ウェアハウスの1行以上の行を、hr.locations表の行のうちのlocation_idに対応する値を持つ1行の関連付けます。