How to Use Sample Schemas

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.

To learn how to use sample schemas in Oracle database, follow these steps:

  1. Download Oracle 12c Enterprise Edition Release 1 for Windows, by visiting
  2. After the download, install Oracle 12c on your Windows computer. Make note of the passwords you specify for SYS and SYSTEM. Be sure to install the sample schemas when prompted during the database creation steps. You will be prompted for passwords for each sample schema. Make a note of the passwords, especially the password for "HR" as this is the schema we will focus on.
  3. Start "SQL Plus". SQL Plus is one of the icons under the Oracle 12c category on your Start Menu.
  4. You will be prompted for the user name. Enter hr and hit Enter:
    SQL Plus sign in
    You will be prompted for the hr password. Enter the password and hit Enter again.
  5. We will now explore the HR (Human Resources) sample schema.
  6. Type in the following SQL statement to view the tables in the HR schema:
    HR tables
  7. Let's select a sample employee and take a brief tour of some of the tables. Type in the following SQL statement and hit Enter:
    Sample employee select
    The department_id connects the employee to a department.
  8. Let's get more data on the department:
    Sample department select
    The location_id connects the department to a location.
  9. With the location_id we can determine the location city and state or province:
    Sample location select
    The country_id connects the location to a country.
  10. We'll end our quick tour of the HR schema by using the country_id to display country name:
    Sample country select
Author: Stephen Withrow

Stephen has over 30 years of experience in training, development, and consulting in a variety of technology areas including Python, Java, C, C++, XML, JavaScript, Tomcat, JBoss, Oracle, and DB2. His background includes design and implementation of business solutions on client/server, Web, and enterprise platforms. Stephen has a 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, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.