Load Example SQLServer
Load Example SQLServer
Load Example SQLServer
go
use company;
go
-- ********************************************************************
-- Create the REGIONS table to hold region information for locations
-- HR.LOCATIONS table has a foreign key to this table.
-- ********************************************************************
-- Create the COUNTRIES table to hold country information for customers
-- and company locations.
-- OE.CUSTOMERS table and HR.LOCATIONS have a foreign key to this table.
-- ********************************************************************
-- Create the LOCATIONS table to hold address information for company departments.
-- HR.DEPARTMENTS has a foreign key to this table.
-- ********************************************************************
-- Create the DEPARTMENTS table to hold company department information.
-- HR.EMPLOYEES and HR.JOB_HISTORY have a foreign key to this table.
-- ********************************************************************
-- Create the JOBS table to hold the different names of job roles within the
company.
-- HR.EMPLOYEES has a foreign key to this table.
-- ********************************************************************
-- Create the EMPLOYEES table to hold the employee personnel
-- information for the company.
-- HR.EMPLOYEES has a self referencing foreign key to this table.
-- ********************************************************************
-- Create the JOB_HISTORY table to hold the history of jobs that
-- employees have held in the past.
-- HR.JOBS, HR_DEPARTMENTS, and HR.EMPLOYEES have a foreign key to this table.
-- ********************************************************************
-- Create the EMP_DETAILS_VIEW that joins the employees, jobs,
-- departments, jobs, countries, and locations table to provide details
-- about employees.