You are on page 1of 10

M/sฺSeed Infotech Ltdฺ

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Table Descriptions

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
j es and/or
Copyright © 2014,iOracle t o u
r
(b ense
its affiliates. All rights reserved.
i
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no
M/sฺSeed Infotech Ltdฺ

Schema Description
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
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

• 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. s a
a
) hjobฺhas an
The company also tracks information about the jobs within the organization. Each
m
identification code, job title, and a minimum and maximum salary range
a i l ฺcforothe ujob.
i deSome
employees have been with the company for a long time and have
g mheld different
n t G positions
within the company. When an employee resigns, the duration
the job identification number, and the department are recorded. i 5 u de was working for,
7@thetemployee
t a m his S
The sample company is regionally diverse, so
g a utracksethet locations of its warehouses and
it
departments. Each employee is assigned
j e s hto a us and each department is identified
department,
t o
either by a unique department number
one location, and each location i bria full
(has or a e
n s short name. Each department is associated with
address that includes the street name, postal code,
a m l
t the country i c e
city, state or province,u and e code.
a b
G departments l
In places where
s h the
f e ra and warehouses are located, the company records details
ijecountry
such as rthe
a s currency symbol, currency name, and the region where the country
nname,
B - t r
is located geographically.
non

Oracle Database 12c: SQL Workshop I A - 2


M/sฺSeed Infotech Ltdฺ

HR Entity Relationship Diagram

HR DEPARTMENTS
department_id
LOCATIONS
location_id
department_name street_address
manager_id postal_code
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

location_id city
state_province
JOB_HISTORY
employee_id
start_date EMPLOYEES
end_date employee_id
job_id first_name COUNTRIES
department_id last_name country_id
email country_name
phone_number region_id
hire_date

JOBS
job_id
s a
job_id
salary
commission_pct ) h a
job_title manager_id o m
c uideฺ
min_salary i l ฺ
REGIONS
max_salary
department_id
g ma region_name
n t G
region_id

i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 3


M/sฺSeed Infotech Ltdฺ
Human Resources (HR) Table Descriptions
DESCRIBE countries
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM countries

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 4


M/sฺSeed Infotech Ltdฺ
DESCRIBE departments
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM departments

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 5


M/sฺSeed Infotech Ltdฺ
DESCRIBE employees
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM employees


s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 6

. . .
M/sฺSeed Infotech Ltdฺ
DESCRIBE job_history
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM job_history

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 7


M/sฺSeed Infotech Ltdฺ
DESCRIBE jobs
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM jobs

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 8


M/sฺSeed Infotech Ltdฺ
DESCRIBE locations
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM locations

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 9


M/sฺSeed Infotech Ltdฺ
DESCRIBE regions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

SELECT * FROM regions

s a
) h a
m
c uideฺ
o
i l ฺ
g ma nt G
i 5 7@ tude
t a m his S
h g au se t
r i j es e to u
i (b ens
u t am e lic
G a abl
es h sfer
j
Bri n-tran
no

Oracle Database 12c: SQL Workshop I A - 10

You might also like