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:
- 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.
- We will start by displaying the columns on the
Employeestable. Type in the following statement and press Enter:
job_idconnects the employee to a job in the
Jobstable and the
manager_idconnects the employee to a manager in the
- Let's select an employee. Type in the following SQL statement and press Enter:
We'll make note of the
- Type in the following select to learn the name of the manager for the employee we selected:
Jobstable contains a row for each job position. We can display the columns on this table:
- To learn the job title of the employee selected earlier, type in the following select statement:
- The history of positions employees previously held within the company is stored in the
- 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).