Vous êtes sur la page 1sur 10

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

Table Descriptions

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

e
niv

Or

U
e
l
ac

y
onl

Schema Description

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

Overall Description
The Oracle Database sample schemas portray a sample company that operates worldwide to
fill orders for several different products. The company has three divisions:
Human Resources: Tracks information about employees and facilities
Order Entry: Tracks product inventories and sales through various channels
Sales History: Tracks business statistics to facilitate business decisions
Each of these divisions is represented by a schema. In this course, you have access to the
objects in all the schemas. However, the emphasis of the examples, demonstrations, and
practices is on the Human Resources (HR) schema.
All scripts necessary to create the sample schemas reside in the
$ORACLE_HOME/demo/schema/ folder.
Human Resources (HR)
This is the schema that is used in this course. In the Human Resource (HR) records, each
employee has an identification number, email address, job identification code, salary, and
manager. Some employees earn commissions in addition to their salary.

y
onl

The company also tracks information about the jobs within the organization. Each job has an
identification code, job title, and a minimum and maximum salary range for the job. Some
employees have been with the company for a long time and have held different positions
within the company. When an employee resigns, the duration the employee was working for,
the job identification number, and the department are recorded.

us

A
S
ru

Pe
c
te the locations of its warehouses and
The sample company is regionally diverse, so e
it rtracks
b
departments. Each employee is assignedC
toi a department, and each department is identified
d
n or a short name. Each department is associated with
either by a unique department number
a
y
one location, and each location
sit has a full address that includes the street name, postal code,
r
e
city, state or province, iand
n v the country code.
U
In places where
lethe departments and warehouses are located, the company records details
c
a
such as the
country
name, currency symbol, currency name, and the region where the country
Or
is located geographically.

Oracle Database 12c: SQL Workshop I A - 2

HR Entity Relationship Diagram

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

HR

DEPARTMENTS

LOCATIONS

department_id
department_name
manager_id
location_id

location_id
street_address
postal_code
city
state_province

JOB_HISTORY
employee_id
start_date
end_date
job_id
department_id

EMPLOYEES
employee_id
first_name
last_name
email
phone_number
hire_date
job_id
salary
commission_pct
manager_id
department_id

JOBS

job_id
job_title
min_salary
max_salary

COUNTRIES
country_id
country_name
region_id

y
onl

se
u

CREGIONS

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 3

region_id
region_name

Human Resources (HR) Table Descriptions

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE countries

SELECT * FROM countries

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 4

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE departments

SELECT * FROM departments

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 5

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE employees

SELECT * FROM employees

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 6


. . .

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE job_history

SELECT * FROM job_history

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 7

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE jobs

SELECT * FROM jobs

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 8

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE locations

SELECT * FROM locations

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 9

y
onl

Unauthorized reproduction or distribution prohibited Copyright 2012, Oracle and/or its affiliates

DESCRIBE regions

SELECT * FROM regions

us

A
S
ru

P
c
e
t
er

ib
C
d

a
sity

e
niv

U
e
l
ac

Or

Oracle Database 12c: SQL Workshop I A - 10

y
onl

Vous aimerez peut-être aussi