• google plus

How to Work with HR Schema Entities

Oracle database is shipped with several sample schemas. These schemas are models for real-world solutions of common business applications such as human resources and order entry. In this topic, we will look at the human resources (HR) schema entities, or tables.

To learn how to work with HR schema entities, follow these steps:

  1. You'll need to download and install Oracle 12c. The instructions for the setup can be found in How to use sample schemas. Follow steps 1 through 6 before proceeding to the next step.
  2. We will start by displaying the columns on the Employees table. Type in the following statement and press Enter:
    Describe Employees table
    The job_id connects the employee to a job in the Jobs table and the manager_id connects the employee to a manager in the Employees table.
  3. Let's select an employee. Type in the following SQL statement and press Enter:
    Employee select
    We'll make note of the job_id and the manager_id.
  4. Type in the following select to learn the name of the manager for the employee we selected:
    Manager select
  5. The Jobs table contains a row for each job position. We can display the columns on this table:
    Describe Jobs table
  6. To learn the job title of the employee selected earlier, type in the following select statement:
    Job title select
  7. The history of positions employees previously held within the company is stored in the job_history table:
    Describe Job History
  8. In addition to the tables we explored above, the HR schema contains Departments (departments in which employees work), Locations (city and state/province where department is located), Countries (country of location) and Regions (region in which country is located, e.g., Germany is in the "Europe" region).
Author: Stephen Withrow

Stephen has over 30 years' experience in training, development, and consulting in a variety of technology areas including Java, C, C++, XML, JavaScript, AJAX, Tomcat, JBoss, Oracle, and DB2. His background includes design and implementation of business solutions on client/server, Web, and enterprise platforms. Stephen is a published writer in both technical and non-technical endeavors. Stephen received an undergraduate degree in Computer Science and Physics from Florida State University.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, XML, Windows, Java, Adobe, HTML5, JavaScript, Angular, and much more. Check out our complete course catalog.